aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/kvm/x86_64/evmcs_test.c
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2022-02-14 17:12:38 -0800
committerPaolo Bonzini <pbonzini@redhat.com>2022-06-11 10:14:52 -0400
commitccc82ba6bea45189a516c97480b2b70406832f35 (patch)
tree5c1c6f2393fa171f86fd91a3b0b41c5081baa235 /tools/testing/selftests/kvm/x86_64/evmcs_test.c
parentKVM: selftests: Drop stale declarations from kvm_util_base.h (diff)
downloadlinux-dev-ccc82ba6bea45189a516c97480b2b70406832f35.tar.xz
linux-dev-ccc82ba6bea45189a516c97480b2b70406832f35.zip
KVM: selftests: Always open VM file descriptors with O_RDWR
Drop the @perm param from vm_create() and always open VM file descriptors with O_RDWR. There's no legitimate use case for other permissions, and if a selftest wants to do oddball negative testing it can open code the necessary bits instead of forcing a bunch of tests to provide useless information. Signed-off-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing/selftests/kvm/x86_64/evmcs_test.c')
-rw-r--r--tools/testing/selftests/kvm/x86_64/evmcs_test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/kvm/x86_64/evmcs_test.c b/tools/testing/selftests/kvm/x86_64/evmcs_test.c
index e161c6dd7a02..78668605f673 100644
--- a/tools/testing/selftests/kvm/x86_64/evmcs_test.c
+++ b/tools/testing/selftests/kvm/x86_64/evmcs_test.c
@@ -183,7 +183,7 @@ static void save_restore_vm(struct kvm_vm *vm)
kvm_vm_release(vm);
/* Restore state in a new VM. */
- kvm_vm_restart(vm, O_RDWR);
+ kvm_vm_restart(vm);
vm_vcpu_add(vm, VCPU_ID);
vcpu_set_hv_cpuid(vm, VCPU_ID);
vcpu_enable_evmcs(vm, VCPU_ID);