]> git.baikalelectronics.ru Git - kernel.git/commitdiff
KVM: selftests: Use vm_create_without_vcpus() in hardware_disable_test
authorSean Christopherson <seanjc@google.com>
Mon, 18 Apr 2022 20:16:32 +0000 (13:16 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 11 Jun 2022 15:46:32 +0000 (11:46 -0400)
Use vm_create_without_vcpus() instead of open coding a rough equivalent
in hardware_disable_test.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/hardware_disable_test.c

index 81ba8645772ad5ec38665bfe66b1104418c1867c..76f51afa7cccf674d8cb8ee18e316363e6ccfad6 100644 (file)
@@ -104,9 +104,7 @@ static void run_test(uint32_t run)
        for (i = 0; i < VCPU_NUM; i++)
                CPU_SET(i, &cpu_set);
 
-       vm = vm_create(DEFAULT_GUEST_PHY_PAGES);
-       kvm_vm_elf_load(vm, program_invocation_name);
-       vm_create_irqchip(vm);
+       vm = vm_create_without_vcpus(VM_MODE_DEFAULT, DEFAULT_GUEST_PHY_PAGES);
 
        pr_debug("%s: [%d] start vcpus\n", __func__, run);
        for (i = 0; i < VCPU_NUM; ++i) {