]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: selftests: Verify KVM stuffs runtime CPUID OS bits on CR4 writes
authorSean Christopherson <seanjc@google.com>
Thu, 28 Nov 2024 01:33:36 +0000 (17:33 -0800)
committerSean Christopherson <seanjc@google.com>
Wed, 18 Dec 2024 22:19:31 +0000 (14:19 -0800)
commit01bcd829c63fdde92d9d6c32b2ed3ba34ead0930
tree7c3f97623440027520796a8673dff24bbee9417e
parenta2a791e8208623b1575f21c7ec559df095c0a96e
KVM: selftests: Verify KVM stuffs runtime CPUID OS bits on CR4 writes

Extend x86's set sregs test to verify that KVM sets/clears OSXSAVE and
OSKPKE according to CR4.XSAVE and CR4.PKE respectively.  For performance
reasons, KVM is responsible for emulating the architectural behavior of
the OS CPUID bits tracking CR4.

Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Link: https://lore.kernel.org/r/20241128013424.4096668-10-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/x86/set_sregs_test.c