aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/kvm/lib/x86_64/vmx.c
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2022-06-14 20:06:31 +0000
committerSean Christopherson <seanjc@google.com>2022-07-13 18:14:10 -0700
commit1ecbb337fa107c6a08800d34ba4f3296ad01103e (patch)
tree13ee7e52f127ea3407dcea3240a664e9248955db /tools/testing/selftests/kvm/lib/x86_64/vmx.c
parentKVM: selftests: Use kvm_cpu_has() for nested SVM checks (diff)
downloadlinux-dev-1ecbb337fa107c6a08800d34ba4f3296ad01103e.tar.xz
linux-dev-1ecbb337fa107c6a08800d34ba4f3296ad01103e.zip
KVM: selftests: Use kvm_cpu_has() for nested VMX checks
Use kvm_cpu_has() to check for nested VMX 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-7-seanjc@google.com
Diffstat (limited to 'tools/testing/selftests/kvm/lib/x86_64/vmx.c')
-rw-r--r--tools/testing/selftests/kvm/lib/x86_64/vmx.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/tools/testing/selftests/kvm/lib/x86_64/vmx.c b/tools/testing/selftests/kvm/lib/x86_64/vmx.c
index 381432741df4..80a568c439b8 100644
--- a/tools/testing/selftests/kvm/lib/x86_64/vmx.c
+++ b/tools/testing/selftests/kvm/lib/x86_64/vmx.c
@@ -382,18 +382,6 @@ void prepare_vmcs(struct vmx_pages *vmx, void *guest_rip, void *guest_rsp)
init_vmcs_guest_state(guest_rip, guest_rsp);
}
-bool nested_vmx_supported(void)
-{
- struct kvm_cpuid_entry2 *entry = kvm_get_supported_cpuid_entry(1);
-
- return entry->ecx & CPUID_VMX;
-}
-
-void nested_vmx_check_supported(void)
-{
- TEST_REQUIRE(nested_vmx_supported());
-}
-
static void nested_create_pte(struct kvm_vm *vm,
struct eptPageTableEntry *pte,
uint64_t nested_paddr,