]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: selftests: Drop manual XCR0 configuration from SEV smoke test
authorSean Christopherson <seanjc@google.com>
Thu, 3 Oct 2024 23:43:36 +0000 (16:43 -0700)
committerSean Christopherson <seanjc@google.com>
Fri, 1 Nov 2024 16:26:36 +0000 (09:26 -0700)
commit3c4c128d02ed81ddbf9b374a77bc0cb5a91e0a87
tree36dfaf954a8a147cf54bc520396423191555c456
parent28439090ece61e71c2c2b75c3567446e5aea7519
KVM: selftests: Drop manual XCR0 configuration from SEV smoke test

Now that CR4.OSXSAVE and XCR0 are setup by default, drop the manual
enabling from the SEV smoke test that validates FPU state can be
transferred into the VMSA.

In guest_code_xsave(), explicitly set the Requested-Feature Bitmask (RFBM)
to exactly XFEATURE_MASK_X87_AVX instead of relying on the host side of
things to enable only X87_AVX features in guest XCR0.  I.e. match the RFBM
for the host XSAVE.

Link: https://lore.kernel.org/r/20241003234337.273364-11-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/x86_64/sev_smoke_test.c