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>
This commit is contained in:
Sean Christopherson
2022-02-14 17:20:17 -08:00
committed by Paolo Bonzini
parent 02e04c15ca
commit 2ab2c307c7
14 changed files with 42 additions and 40 deletions

View File

@@ -104,7 +104,7 @@ static void run_test(uint32_t run)
for (i = 0; i < VCPU_NUM; i++)
CPU_SET(i, &cpu_set);
vm = vm_create(VM_MODE_DEFAULT, DEFAULT_GUEST_PHY_PAGES);
vm = vm_create(DEFAULT_GUEST_PHY_PAGES);
kvm_vm_elf_load(vm, program_invocation_name);
vm_create_irqchip(vm);