]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: selftests: Avoid memory allocations when adding vCPU in get-reg-list
authorSean Christopherson <seanjc@google.com>
Thu, 9 Jun 2022 17:19:01 +0000 (10:19 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 11 Jun 2022 15:46:33 +0000 (11:46 -0400)
commit660c4a1cc0f02a365bb0adc80ce810cbe180b8f0
tree2b7bb56819fd11bacd10d7bd2c4853e480dfc6d1
parent6e967e0795807603b25f56d9f79a6944c4ff4deb
KVM: selftests: Avoid memory allocations when adding vCPU in get-reg-list

Open code adding and doing setup for a vCPU in get-reg-list in order to
avoid the stack allocation that comes with aarch64_vcpu_add_default().
get-reg-list doesn't need to run the vCPU, and so doesn't need the guest
to be backed with memory.  This will allow future cleanup to turn what is
current vm_create() into a barebones helper.

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