Skip to contentSkip to conversation

x86: vmexit: Allow IPI test to be accelerated by SVM AVIC

PATCH Applied Alejandro Jimenez 2 participants 2 messages May 22, 2024 – Jun 5, 2024 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: vmexit: Allow IPI test to be accelerated by SVM AVIC

The vmexit_ipi test can be used as a rough benchmark for IPI performance since commit 8a8c1fc3b1f8 ("vmexit: measure IPI and EOI cost") added reporting of the average number of cycles taken for IPI delivery. Avoid exposing a PIT to the guest so that SVM AVIC is not inhibited and IPI acceleration can be tested when available and enabled by the host.

---
 x86/unittests.cfg | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
x86/unittests.cfg +4 -1
index 867a8ea2..70cdda72 100644
@@ -81,10 +81,13 @@ file = vmexit.flat
 extra_params = -append 'inl_from_pmtimer'
 groups = vmexit
 
+# To allow IPIs to be accelerated by SVM AVIC when the feature is available and
+# enabled, do not create a Programmable Interval Timer (PIT, a.k.a 8254), since
+# such device will disable/inhibit AVIC if exposed to the guest.
 [vmexit_ipi]
 file = vmexit.flat
 smp = 2
-extra_params = -append 'ipi'
+extra_params = -machine pit=off -append 'ipi'
 groups = vmexit
 
 [vmexit_ipi_halt]

base-commit: 00af1c849ced4e515f8659658d18652df2eb08fa

Signature · 1 line
2.39.3
reviewer Applied
#1 lore raw
Quoted 8 lines · Alejandro Jimenez

The vmexit_ipi test can be used as a rough benchmark for IPI performance since commit 8a8c1fc3b1f8 ("vmexit: measure IPI and EOI cost") added reporting of the average number of cycles taken for IPI delivery. Avoid exposing a PIT to the guest so that SVM AVIC is not inhibited and IPI acceleration can be tested when available and enabled by the host.

[...]

Applied to kvm-x86 next, thanks!

[1/1] x86: vmexit: Allow IPI test to be accelerated by SVM AVIC

      https://github.com/kvm-x86/kvm-unit-tests/commit/354b6957994f

--
https://github.com/kvm-x86/kvm-unit-tests/tree/next