KVM: selftests: Use this_cpu_has() to detect SVM support in L1
authorSean Christopherson <seanjc@google.com>
Tue, 14 Jun 2022 20:06:59 +0000 (20:06 +0000)
committerSean Christopherson <seanjc@google.com>
Thu, 14 Jul 2022 01:14:22 +0000 (18:14 -0700)
commit05c2b6e5facc4f04e4df0cfedbcc8943318ed983
treec0d695256cf4c37528c5dff36287fd18d84b610d
parent2b424a76d02cf6f8d94eeb253b1c0e4327b1718a
KVM: selftests: Use this_cpu_has() to detect SVM support in L1

Replace an evil open coded instance of querying CPUID from L1 with
this_cpu_has(X86_FEATURE_SVM).

No functional change intended.

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