Skip to content

Commit f663132

Browse files
Andrew Jonesbonzini
authored andcommitted
KVM: selftests: Drop pointless vm_create wrapper
Signed-off-by: Andrew Jones <drjones@redhat.com> Message-Id: <20201104212357.171559-3-drjones@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent 92ab4b9 commit f663132

4 files changed

Lines changed: 3 additions & 9 deletions

File tree

tools/testing/selftests/kvm/dirty_log_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ static struct kvm_vm *create_vm(enum vm_guest_mode mode, uint32_t vcpuid,
362362

363363
pr_info("Testing guest mode: %s\n", vm_guest_mode_string(mode));
364364

365-
vm = _vm_create(mode, DEFAULT_GUEST_PHY_PAGES + extra_pg_pages, O_RDWR);
365+
vm = vm_create(mode, DEFAULT_GUEST_PHY_PAGES + extra_pg_pages, O_RDWR);
366366
kvm_vm_elf_load(vm, program_invocation_name, 0, 0);
367367
#ifdef __x86_64__
368368
vm_create_irqchip(vm);

tools/testing/selftests/kvm/include/kvm_util.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ int vcpu_enable_cap(struct kvm_vm *vm, uint32_t vcpu_id,
6868
void vm_enable_dirty_ring(struct kvm_vm *vm, uint32_t ring_size);
6969

7070
struct kvm_vm *vm_create(enum vm_guest_mode mode, uint64_t phy_pages, int perm);
71-
struct kvm_vm *_vm_create(enum vm_guest_mode mode, uint64_t phy_pages, int perm);
7271
void kvm_vm_free(struct kvm_vm *vmp);
7372
void kvm_vm_restart(struct kvm_vm *vmp, int perm);
7473
void kvm_vm_release(struct kvm_vm *vmp);

tools/testing/selftests/kvm/include/perf_test_util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ static struct kvm_vm *create_vm(enum vm_guest_mode mode, int vcpus,
105105

106106
pr_info("Testing guest mode: %s\n", vm_guest_mode_string(mode));
107107

108-
vm = _vm_create(mode, pages, O_RDWR);
108+
vm = vm_create(mode, pages, O_RDWR);
109109
kvm_vm_elf_load(vm, program_invocation_name, 0, 0);
110110
#ifdef __x86_64__
111111
vm_create_irqchip(vm);

tools/testing/selftests/kvm/lib/kvm_util.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ _Static_assert(sizeof(vm_guest_mode_params)/sizeof(struct vm_guest_mode_params)
180180
* descriptor to control the created VM is created with the permissions
181181
* given by perm (e.g. O_RDWR).
182182
*/
183-
struct kvm_vm *_vm_create(enum vm_guest_mode mode, uint64_t phy_pages, int perm)
183+
struct kvm_vm *vm_create(enum vm_guest_mode mode, uint64_t phy_pages, int perm)
184184
{
185185
struct kvm_vm *vm;
186186

@@ -271,11 +271,6 @@ struct kvm_vm *_vm_create(enum vm_guest_mode mode, uint64_t phy_pages, int perm)
271271
return vm;
272272
}
273273

274-
struct kvm_vm *vm_create(enum vm_guest_mode mode, uint64_t phy_pages, int perm)
275-
{
276-
return _vm_create(mode, phy_pages, perm);
277-
}
278-
279274
/*
280275
* VM Restart
281276
*

0 commit comments

Comments
 (0)