KVM: selftests: Verify XCR0 can be "downgraded" and "upgraded"
authorSean Christopherson <seanjc@google.com>
Thu, 3 Oct 2024 23:43:32 +0000 (16:43 -0700)
committerSean Christopherson <seanjc@google.com>
Fri, 1 Nov 2024 16:26:32 +0000 (09:26 -0700)
commit8ae01bf64caaea5562f3af40a2fbe404a1e79403
tree952612aa21d7f708ecf2051de1cc877852a36348
parent8b14c4d85d031f7700fa4e042aebf99d933971f0
KVM: selftests: Verify XCR0 can be "downgraded" and "upgraded"

Now that KVM selftests enable all supported XCR0 features by default, add
a testcase to the XCR0 vs. CPUID test to verify that the guest can disable
everything except the legacy FPU in XCR0, and then re-enable the full
feature set, which is kinda sorta what the test did before XCR0 was setup
by default.

Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Link: https://lore.kernel.org/r/20241003234337.273364-7-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/x86_64/xcr0_cpuid_test.c