linux-kernelorg-stable/tools/testing/selftests/kvm/lib/x86
Oliver Upton a133052666 KVM: selftests: Fix irqfd_test for non-x86 architectures
The KVM_IRQFD ioctl fails if no irqchip is present in-kernel, which
isn't too surprising as there's not much KVM can do for an IRQ if it
cannot resolve a destination.

As written the irqfd_test assumes that a 'default' VM created in
selftests has an in-kernel irqchip created implicitly. That may be the
case on x86 but it isn't necessarily true on other architectures.

Add an arch predicate indicating if 'default' VMs get an irqchip and
make the irqfd_test depend on it. Work around arm64 VGIC initialization
requirements by using vm_create_with_one_vcpu(), ignoring the created
vCPU as it isn't used for the test.

Reported-by: Sebastian Ott <sebott@redhat.com>
Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Acked-by: Sean Christopherson <seanjc@google.com>
Fixes: 7e9b231c40 ("KVM: selftests: Add a KVM_IRQFD test to verify uniqueness requirements")
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Marc Zyngier <maz@kernel.org>
2025-10-13 14:17:03 +01:00
..
apic.c
handlers.S
hyperv.c
memstress.c
pmu.c KVM: selftests: Handle Intel Atom errata that leads to PMU event overcount 2025-09-23 08:38:59 -07:00
processor.c KVM: selftests: Fix irqfd_test for non-x86 architectures 2025-10-13 14:17:03 +01:00
sev.c KVM: selftests: Add library support for interacting with SNP 2025-05-02 12:32:33 -07:00
svm.c
ucall.c
vmx.c