diff mbox series

[kvm-unit-tests,1/9] x86/apic: Add test config to allow running apic tests against SVM's AVIC

Message ID 20221001011301.2077437-2-seanjc@google.com (mailing list archive)
State New, archived
Headers show
Series x86/apic: Cleanups and new tests | expand

Commit Message

Sean Christopherson Oct. 1, 2022, 1:12 a.m. UTC
Add a curated "xapic" test configuration that hides x2APIC from the guest
and does not expose a PIT/8254 timer to the guest so that KVM won't
disable AVIC due to incompatibilities.

Set the timeout to '60' as the test is painfully slow when AVIC is
enabled.

Cc: Maxim Levitsky <mlevitsk@redhat.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
---
 x86/unittests.cfg | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/x86/unittests.cfg b/x86/unittests.cfg
index ed65185..7600935 100644
--- a/x86/unittests.cfg
+++ b/x86/unittests.cfg
@@ -30,18 +30,31 @@  file = apic.flat
 smp = 2
 extra_params = -cpu qemu64,+x2apic,+tsc-deadline -machine kernel_irqchip=split
 arch = x86_64
+groups = apic
 
 [ioapic-split]
 file = ioapic.flat
 extra_params = -cpu qemu64 -machine kernel_irqchip=split
 arch = x86_64
+groups = apic
 
-[apic]
+[x2apic]
 file = apic.flat
 smp = 2
 extra_params = -cpu qemu64,+x2apic,+tsc-deadline
 arch = x86_64
 timeout = 30
+groups = apic
+
+# Hide x2APIC and don't create a Programmable Interval Timer (PIT, a.k.a 8254)
+# to allow testing SVM's AVIC, which is disabled if either is exposed to the guest.
+[xapic]
+file = apic.flat
+smp = 2
+extra_params = -cpu qemu64,-x2apic,+tsc-deadline -machine pit=off
+arch = x86_64
+timeout = 60
+groups = apic
 
 [ioapic]
 file = ioapic.flat