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

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

index 9dfc861a3cf3bb07f99dd54d255d831a8d5334db..13962d107948c0497a41393916bc70212869c747 100644 (file)
@@ -674,11 +674,8 @@ static struct kvm_vm *create_vm(enum vm_guest_mode mode, uint32_t vcpuid,
 
        pr_info("Testing guest mode: %s\n", vm_guest_mode_string(mode));
 
-       vm = __vm_create(mode, DEFAULT_GUEST_PHY_PAGES + extra_pg_pages);
-       kvm_vm_elf_load(vm, program_invocation_name);
-#ifdef __x86_64__
-       vm_create_irqchip(vm);
-#endif
+       vm = vm_create_without_vcpus(mode, DEFAULT_GUEST_PHY_PAGES + extra_pg_pages);
+
        log_mode_create_vm_done(vm);
        vm_vcpu_add_default(vm, vcpuid, guest_code);
        return vm;