diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2025-10-18 10:25:31 +0200 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-10-18 10:25:31 +0200 |
| commit | 5d26eaae15fb5c190164362a3e19081935574efc (patch) | |
| tree | d5b6f42250d390b9f232c53c84da3ecce1bc80aa /tools/testing/selftests/kvm/include | |
| parent | Linux 6.18-rc1 (diff) | |
| parent | arm64: Revamp HCR_EL2.E2H RES1 detection (diff) | |
| download | linux-5d26eaae15fb5c190164362a3e19081935574efc.tar.gz linux-5d26eaae15fb5c190164362a3e19081935574efc.zip | |
Merge tag 'kvmarm-fixes-6.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD
KVM/arm64 fixes for 6.18, take #1
Improvements and bug fixes:
- Fix the handling of ZCR_EL2 in NV VMs
(20250926194108.84093-1-oliver.upton@linux.dev)
- Pick the correct translation regime when doing a PTW on
the back of a SEA (20250926224246.731748-1-oliver.upton@linux.dev)
- Prevent userspace from injecting an event into a vcpu that isn't
initialised yet (20250930085237.108326-1-oliver.upton@linux.dev)
- Move timer save/restore to the sysreg handling code, fixing EL2 timer
access in the process (20250929160458.3351788-1-maz@kernel.org)
- Add FGT-based trapping of MDSCR_EL1 to reduce the overhead of debug
(20250924235150.617451-1-oliver.upton@linux.dev)
- Fix trapping configuration when the host isn't GICv3
(20251007160704.1673584-1-sascha.bischoff@arm.com)
- Improve the detection of HCR_EL2.E2H being RES1
(20251009121239.29370-1-maz@kernel.org)
- Drop a spurious 'break' statement in the S1 PTW
(20250930135621.162050-1-osama.abdelkader@gmail.com)
- Don't try to access SPE when owned by EL3
(20251010174707.1684200-1-mukesh.ojha@oss.qualcomm.com)
Documentation updates:
- Document the failure modes of event injection
(20250930233620.124607-1-oliver.upton@linux.dev)
- Document that a GICv3 guest can be created on a GICv5 host
with FEAT_GCIE_LEGACY (20251007154848.1640444-1-sascha.bischoff@arm.com)
Selftest improvements:
- Add a selftest for the effective value of HCR_EL2.AMO
(20250926224454.734066-1-oliver.upton@linux.dev)
- Address build warning in the timer selftest when building
with clang (20250926155838.2612205-1-seanjc@google.com)
- Teach irq_fd selftests about non-x86 architectures
(20250930193301.119859-1-oliver.upton@linux.dev)
- Add missing sysregs to the set_id_regs selftest
(20251012154352.61133-1-zenghui.yu@linux.dev)
- Fix vcpu allocation in the vgic_lpi_stress selftest
(20251008154520.54801-1-zenghui.yu@linux.dev)
- Correctly enable interrupts in the vgic_lpi_stress selftest
(20251007195254.260539-1-oliver.upton@linux.dev)
Diffstat (limited to 'tools/testing/selftests/kvm/include')
| -rw-r--r-- | tools/testing/selftests/kvm/include/arm64/processor.h | 12 | ||||
| -rw-r--r-- | tools/testing/selftests/kvm/include/kvm_util.h | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/tools/testing/selftests/kvm/include/arm64/processor.h b/tools/testing/selftests/kvm/include/arm64/processor.h index 6f481475c135..ff928716574d 100644 --- a/tools/testing/selftests/kvm/include/arm64/processor.h +++ b/tools/testing/selftests/kvm/include/arm64/processor.h @@ -305,7 +305,17 @@ void test_wants_mte(void); void test_disable_default_vgic(void); bool vm_supports_el2(struct kvm_vm *vm); -static bool vcpu_has_el2(struct kvm_vcpu *vcpu) + +static inline bool test_supports_el2(void) +{ + struct kvm_vm *vm = vm_create(1); + bool supported = vm_supports_el2(vm); + + kvm_vm_free(vm); + return supported; +} + +static inline bool vcpu_has_el2(struct kvm_vcpu *vcpu) { return vcpu->init.features[0] & BIT(KVM_ARM_VCPU_HAS_EL2); } diff --git a/tools/testing/selftests/kvm/include/kvm_util.h b/tools/testing/selftests/kvm/include/kvm_util.h index 26cc30290e76..112d3f443a17 100644 --- a/tools/testing/selftests/kvm/include/kvm_util.h +++ b/tools/testing/selftests/kvm/include/kvm_util.h @@ -1273,4 +1273,6 @@ bool vm_is_gpa_protected(struct kvm_vm *vm, vm_paddr_t paddr); uint32_t guest_get_vcpuid(void); +bool kvm_arch_has_default_irqchip(void); + #endif /* SELFTEST_KVM_UTIL_H */ |
