Skip to content

Commit d563164

Browse files
suomilewissean-jc
authored andcommitted
KVM: selftests: Check that XTILEDATA supports XFD
Check that XTILEDATA supports XFD. In amx_test, add the requirement that the guest allows the xfeature, XTILEDATA, to be set in XFD. Otherwise, the test may fail. Signed-off-by: Aaron Lewis <aaronlewis@google.com> Signed-off-by: Mingwei Zhang <mizhang@google.com> Link: https://lore.kernel.org/r/20230221163655.920289-14-mizhang@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent d32fb07 commit d563164

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

tools/testing/selftests/kvm/include/x86_64/processor.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ struct kvm_x86_cpu_feature {
143143
#define X86_FEATURE_XTILEDATA KVM_X86_CPU_FEATURE(0xD, 0, EAX, 18)
144144
#define X86_FEATURE_XSAVES KVM_X86_CPU_FEATURE(0xD, 1, EAX, 3)
145145
#define X86_FEATURE_XFD KVM_X86_CPU_FEATURE(0xD, 1, EAX, 4)
146+
#define X86_FEATURE_XTILEDATA_XFD KVM_X86_CPU_FEATURE(0xD, 18, ECX, 2)
146147

147148
/*
148149
* Extended Leafs, a.k.a. AMD defined

tools/testing/selftests/kvm/x86_64/amx_test.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ int main(int argc, char *argv[])
258258
TEST_REQUIRE(kvm_cpu_has(X86_FEATURE_AMX_TILE));
259259
TEST_REQUIRE(kvm_cpu_has(X86_FEATURE_XTILECFG));
260260
TEST_REQUIRE(kvm_cpu_has(X86_FEATURE_XTILEDATA));
261+
TEST_REQUIRE(kvm_cpu_has(X86_FEATURE_XTILEDATA_XFD));
261262

262263
/* Create VM */
263264
vm = vm_create_with_one_vcpu(&vcpu, guest_code);

0 commit comments

Comments
 (0)