Commit 2697646b authored by Sean Christopherson's avatar Sean Christopherson
Browse files

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: default avatarSean Christopherson <seanjc@google.com>
Link: https://lore.kernel.org/r/20220614200707.3315957-11-seanjc@google.com
parent fdd1e278
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;