Skip to content

Commit

Permalink
selftests: kvm: vmx_set_nested_state_test: don't check for VMX suppor…
Browse files Browse the repository at this point in the history
…t twice

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 <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
  • Loading branch information
vittyvk authored and bonzini committed Oct 22, 2019
1 parent 44551b2 commit 700c17d
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 700c17d

Please sign in to comment.