From 3c16181b2652e4e99b478e2c0251aaa24a15e695 Mon Sep 17 00:00:00 2001 From: Sean Christopherson Date: Mon, 18 Apr 2022 13:16:32 -0700 Subject: [PATCH] KVM: selftests: Use vm_create_without_vcpus() in hardware_disable_test Use vm_create_without_vcpus() instead of open coding a rough equivalent in hardware_disable_test. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini --- tools/testing/selftests/kvm/hardware_disable_test.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/testing/selftests/kvm/hardware_disable_test.c b/tools/testing/selftests/kvm/hardware_disable_test.c index 81ba864..76f51af 100644 --- a/tools/testing/selftests/kvm/hardware_disable_test.c +++ b/tools/testing/selftests/kvm/hardware_disable_test.c @@ -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) { -- 2.7.4