The check in amx_test that ensures that XSAVE supports XTILE, doesn't actually check anything. It simply returns a bool which the test does nothing with. Additionally, the check ensures that at least one of the XTILE bits are set, XTILECFG or XTILEDATA, when it really should be checking that both are set. Change both behaviors to: 1) Asserting if the check fails. 2) Fail if both XTILECFG and XTILEDATA aren't set. Fixes: 5dc19f1c7dd3 ("KVM: selftests: Convert AMX test to use X86_PROPRETY_XXX") Fixes: bf70636d9443 ("selftest: kvm: Add amx selftest") Signed-off-by: Aaron Lewis <aaronlewis@xxxxxxxxxx> --- tools/testing/selftests/kvm/x86_64/amx_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/kvm/x86_64/amx_test.c b/tools/testing/selftests/kvm/x86_64/amx_test.c index bd72c6eb3b670..db1b38ca7c840 100644 --- a/tools/testing/selftests/kvm/x86_64/amx_test.c +++ b/tools/testing/selftests/kvm/x86_64/amx_test.c @@ -119,9 +119,9 @@ static inline void check_cpuid_xsave(void) GUEST_ASSERT(this_cpu_has(X86_FEATURE_OSXSAVE)); } -static bool check_xsave_supports_xtile(void) +static inline void check_xsave_supports_xtile(void) { - return __xgetbv(0) & XFEATURE_MASK_XTILE; + GUEST_ASSERT((__xgetbv(0) & XFEATURE_MASK_XTILE) == XFEATURE_MASK_XTILE); } static void check_xtile_info(void) -- 2.39.0.314.g84b9a713c41-goog