]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: selftests: Add MONITOR/MWAIT quirk test
authorSean Christopherson <seanjc@google.com>
Wed, 8 Jun 2022 22:45:16 +0000 (22:45 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 22 Jun 2022 19:14:20 +0000 (15:14 -0400)
commit62faa6e57f9674d5af1e071835b6fbbd1702ba4e
treeff5dd64034e312823d466ac090a49540f8ce8c82
parent095d6bba7792af8dffe2cf40ee33f1b0fd45d1e7
KVM: selftests: Add MONITOR/MWAIT quirk test

Add a test to verify the "MONITOR/MWAIT never fault" quirk, and as a
bonus, also verify the related "MISC_ENABLES ignores ENABLE_MWAIT" quirk.

If the "never fault" quirk is enabled, MONITOR/MWAIT should always be
emulated as NOPs, even if they're reported as disabled in guest CPUID.
Use the MISC_ENABLES quirk to coerce KVM into toggling the MWAIT CPUID
enable, as KVM now disallows manually toggling CPUID bits after running
the vCPU.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220608224516.3788274-6-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/.gitignore
tools/testing/selftests/kvm/Makefile
tools/testing/selftests/kvm/x86_64/monitor_mwait_test [deleted file]
tools/testing/selftests/kvm/x86_64/monitor_mwait_test.c [new file with mode: 0644]