diff options
| author | Sean Christopherson <seanjc@google.com> | 2022-04-18 16:26:06 -0700 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-06-11 11:46:33 -0400 |
| commit | 95fb0460719721962997d344bf9d63812c1dab67 (patch) | |
| tree | 1e7dadf884efc2febd93ac266e787eb763d51620 /tools/testing/selftests/kvm/aarch64/vcpu_width_config.c | |
| parent | eb0adbc03aafdb3dd0740eaaeb26051fd5e35c20 (diff) | |
| download | linux-next-95fb0460719721962997d344bf9d63812c1dab67.tar.gz linux-next-95fb0460719721962997d344bf9d63812c1dab67.zip | |
KVM: selftests: Rename vm_create() => vm_create_barebones(), drop param
Rename vm_create() to vm_create_barebones() and drop the @phys_pages
param. Pass '0' for the number of pages even though some callers pass
'DEFAULT_GUEST_PHY_PAGES', as the intent behind creating truly barebones
VMs is purely to create a VM, i.e. there aren't vCPUs, there's no guest
code loaded, etc..., and so there is nothing that will ever need or
consume guest memory.
Freeing up the name vm_create() will allow using the name for an inner
helper to the other VM creators, which need a "full" VM.
Opportunisticaly rewrite the function comment for addr_gpa2alias() to
focus on what the _function_ does, not what its _sole caller_ does.
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing/selftests/kvm/aarch64/vcpu_width_config.c')
| -rw-r--r-- | tools/testing/selftests/kvm/aarch64/vcpu_width_config.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/testing/selftests/kvm/aarch64/vcpu_width_config.c b/tools/testing/selftests/kvm/aarch64/vcpu_width_config.c index 4145c28a245a..1757f44dd3e2 100644 --- a/tools/testing/selftests/kvm/aarch64/vcpu_width_config.c +++ b/tools/testing/selftests/kvm/aarch64/vcpu_width_config.c @@ -24,7 +24,7 @@ static int add_init_2vcpus(struct kvm_vcpu_init *init1, struct kvm_vm *vm; int ret; - vm = vm_create(DEFAULT_GUEST_PHY_PAGES); + vm = vm_create_barebones(); vm_vcpu_add(vm, 0); ret = __vcpu_ioctl(vm, 0, KVM_ARM_VCPU_INIT, init1); @@ -49,7 +49,7 @@ static int add_2vcpus_init_2vcpus(struct kvm_vcpu_init *init1, struct kvm_vm *vm; int ret; - vm = vm_create(DEFAULT_GUEST_PHY_PAGES); + vm = vm_create_barebones(); vm_vcpu_add(vm, 0); vm_vcpu_add(vm, 1); @@ -86,7 +86,7 @@ int main(void) } /* Get the preferred target type and copy that to init2 for later use */ - vm = vm_create(DEFAULT_GUEST_PHY_PAGES); + vm = vm_create_barebones(); vm_ioctl(vm, KVM_ARM_PREFERRED_TARGET, &init1); kvm_vm_free(vm); init2 = init1; |
