[kvm-unit-tests PATCH 03/14] x86: msr: Advertise GenuineIntel as vendor to play nice with SYSENTER

Sean Christopherson
2021-04-22T03:05:23Z

Run msr.flat as vendor GenuineIntel so that KVM SVM will intercept
SYSENTER_ESP and SYSENTER_EIP in order to preserve bits 63:32.
Alternatively, this could be handled in the test, but fudging the
config is easier and it also adds coverage for KVM's aforementioned
emulation.

Signed-off-by: Sean Christopherson <seanjc@google.com>
---
x86/unittests.cfg | 3 +++
1 file changed, 3 insertions(+)

diff --git a/x86/unittests.cfg b/x86/unittests.cfg
index 0698d15..c2608bc 100644
--- a/x86/unittests.cfg
+++ b/x86/unittests.cfg
@@ -167,7 +167,10 @@ extra_params = -cpu max
arch = x86_64

[msr]
+# Use GenuineIntel to ensure SYSENTER MSRs are fully preserved, and to test
+# SVM emulation of Intel CPU behavior.
file = msr.flat
+extra_params = -cpu qemu64,vendor=GenuineIntel

[pmu]
file = pmu.flat