KVM: selftests: Add VM creation helper that "returns" vCPUs
authorSean Christopherson <seanjc@google.com>
Wed, 16 Feb 2022 19:19:18 +0000 (11:19 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 11 Jun 2022 15:47:06 +0000 (11:47 -0400)
commit0ffc70eab775b52432a76f26aada24c5b78ef0eb
tree743f12bc266f5c458bbc0f453e590dc9683b7842
parent0750388ca7110d332547f3669715442eac6a1254
KVM: selftests: Add VM creation helper that "returns" vCPUs

Add a VM creator that "returns" the created vCPUs by filling the provided
array.  This will allow converting multi-vCPU tests away from hardcoded
vCPU IDs.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/include/kvm_util_base.h
tools/testing/selftests/kvm/kvm_page_table_test.c
tools/testing/selftests/kvm/lib/kvm_util.c
tools/testing/selftests/kvm/lib/perf_test_util.c