KVM: selftests: Verify userspace can stuff IA32_FEATURE_CONTROL at will
authorSean Christopherson <seanjc@google.com>
Tue, 7 Jun 2022 23:23:53 +0000 (23:23 +0000)
committerSean Christopherson <seanjc@google.com>
Thu, 1 Dec 2022 00:29:54 +0000 (16:29 -0800)
commitb80732fdc9b235046687a2999ed198fa55fde901
treef548e416b7b34a2fd8ae61809e020d6546436c48
parent2d6cd68636d60822219074b7c1d0bfe41321f106
KVM: selftests: Verify userspace can stuff IA32_FEATURE_CONTROL at will

Verify the KVM allows userspace to set all supported bits in the
IA32_FEATURE_CONTROL MSR irrespective of the current guest CPUID, and
that all unsupported bits are rejected.

Throw the testcase into vmx_msrs_test even though it's not technically a
VMX MSR; it's close enough, and the most frequently feature controlled by
the MSR is VMX.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Link: https://lore.kernel.org/r/20220607232353.3375324-4-seanjc@google.com
tools/testing/selftests/kvm/include/x86_64/processor.h
tools/testing/selftests/kvm/x86_64/vmx_msrs_test.c