KVM: selftests: Add vm_create_*() variants to expose/return 'struct vcpu'
authorSean Christopherson <seanjc@google.com>
Tue, 15 Feb 2022 23:14:51 +0000 (15:14 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 11 Jun 2022 15:46:29 +0000 (11:46 -0400)
commitf17686aac61fb23c08efba56ee3f3ceb89572d08
treeca74707e8570dab4b96ac3347454aba87484612d
parent6ebfef83f03f216b25b09a386bef16d05796cdaa
KVM: selftests: Add vm_create_*() variants to expose/return 'struct vcpu'

Add VM creation helpers to expose/return 'struct vcpu' so that tests
don't have to hardcode a VCPU_ID or make assumptions about what vCPU ID
is used by the framework just to retrieve a vCPU the test created.

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/lib/kvm_util.c