selftests: kvm: vmx_set_nested_state_test: don't check for VMX support twice
authorVitaly Kuznetsov <vkuznets@redhat.com>
Tue, 8 Oct 2019 19:43:36 +0000 (21:43 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 22 Oct 2019 11:31:16 +0000 (13:31 +0200)
vmx_set_nested_state_test() checks if VMX is supported twice: in the very
beginning (and skips the whole test if it's not) and before doing
test_vmx_nested_state(). One should be enough.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/x86_64/vmx_set_nested_state_test.c

index 853e370..a6d8561 100644 (file)
@@ -271,12 +271,7 @@ int main(int argc, char *argv[])
        state.flags = KVM_STATE_NESTED_RUN_PENDING;
        test_nested_state_expect_einval(vm, &state);
 
-       /*
-        * TODO: When SVM support is added for KVM_SET_NESTED_STATE
-        *       add tests here to support it like VMX.
-        */
-       if (entry->ecx & CPUID_VMX)
-               test_vmx_nested_state(vm);
+       test_vmx_nested_state(vm);
 
        kvm_vm_free(vm);
        return 0;