]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: selftests: Add this_cpu_has() to query X86_FEATURE_* via cpuid()
authorSean Christopherson <seanjc@google.com>
Tue, 14 Jun 2022 20:06:57 +0000 (20:06 +0000)
committerSean Christopherson <seanjc@google.com>
Thu, 14 Jul 2022 01:14:21 +0000 (18:14 -0700)
commit572582b700c6a70d017154ce6e12f3ed8cf72cdd
treec64d956e7c919eede9a5e890634533b08297c36a
parent132ed47948204ccba2f99926754c021bd1382ce6
KVM: selftests: Add this_cpu_has() to query X86_FEATURE_* via cpuid()

Add this_cpu_has() to query an X86_FEATURE_* via cpuid(), i.e. to query a
feature from L1 (or L2) guest code.  Arbitrarily select the AMX test to
be the first user.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Link: https://lore.kernel.org/r/20220614200707.3315957-33-seanjc@google.com
tools/testing/selftests/kvm/include/x86_64/processor.h
tools/testing/selftests/kvm/x86_64/amx_test.c