KVM: selftests: Verify XTILE_DATA in XSTATE isn't affected by IA32_XFD
authorMingwei Zhang <mizhang@google.com>
Tue, 21 Feb 2023 16:36:50 +0000 (16:36 +0000)
committerSean Christopherson <seanjc@google.com>
Fri, 24 Mar 2023 21:21:39 +0000 (14:21 -0700)
commitbfc5afc37c9dba85f8c057fb85109a72e72d64a5
treed54d27b7c1d087de3cd82ff6b32cf284ea49f5d3
parent9cbd9aaa670f7be61ba569f5c3ebafc2e0aabeb6
KVM: selftests: Verify XTILE_DATA in XSTATE isn't affected by IA32_XFD

Add asserts to verify the XSTATE metadata for XTILE_DATA isn't affected
by disabling AMX tile data via IA32_XFD.  XFD doesn't intercept XSAVE,
it only prevents setting bits in XCR0, i.e. regardless of XFD, AMX state
is managed by XSAVE/XRSTOR as long as the corresponding bits are set XCR0.

Signed-off-by: Mingwei Zhang <mizhang@google.com>
Link: https://lore.kernel.org/r/20230221163655.920289-9-mizhang@google.com
[sean: massage changelog]
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/x86_64/amx_test.c