KVM: selftests: Add a VM backpointer to 'struct vcpu'
authorSean Christopherson <seanjc@google.com>
Tue, 15 Feb 2022 23:14:29 +0000 (15:14 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 11 Jun 2022 15:46:25 +0000 (11:46 -0400)
commitc472df1ac318c1120f32cd4a70d202806be30c43
tree97809d737f6966cb8f9e792acc0698718655b632
parent114eef6e461a6a0810d6ed354b4ce7f3b74fe547
KVM: selftests: Add a VM backpointer to 'struct vcpu'

Add a backpointer to 'struct vcpu' so that tests can get at the owning
VM when passing around a vCPU object.  Long term, this will be little
more than a nice-to-have feature, but in the short term it is a critical
step toward purging the VM+vcpu_id ioctl mess without introducing even
more churn.

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