summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/kvm/include/kvm_util_base.h
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2022-02-14 17:20:17 -0800
committerPaolo Bonzini <pbonzini@redhat.com>2022-06-11 10:15:10 -0400
commit2ab2c307c734266e3c3e89d14d39c3b2327cb750 (patch)
treeb2daebb7a5b42276f5687c5b4f3168b82e9eaf24 /tools/testing/selftests/kvm/include/kvm_util_base.h
parent02e04c15caeeb64a45d350a8fdeb32620b64a02d (diff)
downloadlwn-2ab2c307c734266e3c3e89d14d39c3b2327cb750.tar.gz
lwn-2ab2c307c734266e3c3e89d14d39c3b2327cb750.zip
KVM: selftests: Drop @mode from common vm_create() helper
Drop @mode from vm_create() and have it use VM_MODE_DEFAULT. Add and use an inner helper, __vm_create(), to service the handful of tests that want something other than VM_MODE_DEFAULT. Signed-off-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing/selftests/kvm/include/kvm_util_base.h')
-rw-r--r--tools/testing/selftests/kvm/include/kvm_util_base.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/selftests/kvm/include/kvm_util_base.h b/tools/testing/selftests/kvm/include/kvm_util_base.h
index 00f3103dc85e..f6984b0c3816 100644
--- a/tools/testing/selftests/kvm/include/kvm_util_base.h
+++ b/tools/testing/selftests/kvm/include/kvm_util_base.h
@@ -110,7 +110,8 @@ int vcpu_enable_cap(struct kvm_vm *vm, uint32_t vcpu_id,
void vm_enable_dirty_ring(struct kvm_vm *vm, uint32_t ring_size);
const char *vm_guest_mode_string(uint32_t i);
-struct kvm_vm *vm_create(enum vm_guest_mode mode, uint64_t phy_pages);
+struct kvm_vm *__vm_create(enum vm_guest_mode mode, uint64_t phy_pages);
+struct kvm_vm *vm_create(uint64_t phy_pages);
void kvm_vm_free(struct kvm_vm *vmp);
void kvm_vm_restart(struct kvm_vm *vmp);
void kvm_vm_release(struct kvm_vm *vmp);