diff options
author | Sean Christopherson <seanjc@google.com> | 2022-06-14 20:06:35 +0000 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2022-07-13 18:14:12 -0700 |
commit | 2697646bd343e3e04004f49a3673975729ef9f01 (patch) | |
tree | a3f28f1d29b2ace02de893fca7ee7c1ecf9e7afb /tools | |
parent | fdd1e2788c41e9b420a3744e022b5ff85b7e5fc0 (diff) | |
download | linux-stable-2697646bd343e3e04004f49a3673975729ef9f01.tar.gz linux-stable-2697646bd343e3e04004f49a3673975729ef9f01.tar.bz2 linux-stable-2697646bd343e3e04004f49a3673975729ef9f01.zip |
KVM: selftests: Check for _both_ XTILE data and cfg in AMX test
Check for _both_ XTILE data and cfg support in the AMX test instead of
checking for _either_ feature. Practically speaking, no sane CPU or vCPU
will support one but not the other, but the effective "or" behavior is
subtle and technically incorrect.
Signed-off-by: Sean Christopherson <seanjc@google.com>
Link: https://lore.kernel.org/r/20220614200707.3315957-11-seanjc@google.com
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/kvm/x86_64/amx_test.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/selftests/kvm/x86_64/amx_test.c b/tools/testing/selftests/kvm/x86_64/amx_test.c index 8024562016bc..6fc4e652b38f 100644 --- a/tools/testing/selftests/kvm/x86_64/amx_test.c +++ b/tools/testing/selftests/kvm/x86_64/amx_test.c @@ -335,7 +335,8 @@ int main(int argc, char *argv[]) TEST_REQUIRE(kvm_get_cpuid_max_basic() >= 0xd); entry = kvm_get_supported_cpuid_index(0xd, 0); - TEST_REQUIRE(entry->eax & XFEATURE_MASK_XTILE); + TEST_REQUIRE(entry->eax & XFEATURE_MASK_XTILECFG); + TEST_REQUIRE(entry->eax & XFEATURE_MASK_XTILEDATA); /* Get xsave/restore max size */ xsave_restore_size = entry->ecx; |