diff options
author | Sean Christopherson <seanjc@google.com> | 2022-06-14 20:06:30 +0000 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2022-07-13 18:14:10 -0700 |
commit | f21940a3bb5c6a6cd075f589d9405efc5718690c (patch) | |
tree | 613b49bad4628d9fdc0d1d566d7d65461e71cdf7 /tools/testing/selftests/kvm/lib/x86_64/svm.c | |
parent | KVM: selftests: Use kvm_cpu_has() in the SEV migration test (diff) | |
download | linux-dev-f21940a3bb5c6a6cd075f589d9405efc5718690c.tar.xz linux-dev-f21940a3bb5c6a6cd075f589d9405efc5718690c.zip |
KVM: selftests: Use kvm_cpu_has() for nested SVM checks
Use kvm_cpu_has() to check for nested SVM support, and drop the helpers
now that their functionality is trivial to implement.
No functional change intended.
Signed-off-by: Sean Christopherson <seanjc@google.com>
Link: https://lore.kernel.org/r/20220614200707.3315957-6-seanjc@google.com
Diffstat (limited to 'tools/testing/selftests/kvm/lib/x86_64/svm.c')
-rw-r--r-- | tools/testing/selftests/kvm/lib/x86_64/svm.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/tools/testing/selftests/kvm/lib/x86_64/svm.c b/tools/testing/selftests/kvm/lib/x86_64/svm.c index 37e9c0a923e0..6d445886e16c 100644 --- a/tools/testing/selftests/kvm/lib/x86_64/svm.c +++ b/tools/testing/selftests/kvm/lib/x86_64/svm.c @@ -164,19 +164,6 @@ void run_guest(struct vmcb *vmcb, uint64_t vmcb_gpa) : "r15", "memory"); } -bool nested_svm_supported(void) -{ - struct kvm_cpuid_entry2 *entry = - kvm_get_supported_cpuid_entry(0x80000001); - - return entry->ecx & CPUID_SVM; -} - -void nested_svm_check_supported(void) -{ - TEST_REQUIRE(nested_svm_supported()); -} - /* * Open SEV_DEV_PATH if available, otherwise exit the entire program. * |