KVM: selftests: Convert set_boot_cpu_id away from global VCPU_IDs
authorSean Christopherson <seanjc@google.com>
Wed, 16 Feb 2022 19:07:09 +0000 (11:07 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 11 Jun 2022 15:47:05 +0000 (11:47 -0400)
commit682b11a012b85c18310a6798fe2509c55bf6563e
treec680670cd26152ac9fdbd4b36df124eebd27fddb
parentf742d94ff4e5147e08b3bb7826f009eda7545124
KVM: selftests: Convert set_boot_cpu_id away from global VCPU_IDs

Rework set_boot_cpu_id to pass around 'struct kvm_vcpu' objects instead
of relying on global VCPU_IDs.  The test is still ugly, but that's
unavoidable since the point of the test is to verify that KVM correctly
assigns VCPU_ID==0 to be the BSP by default.  This is literally one of
two KVM selftests that legitimately needs to care about the exact vCPU
IDs of the vCPUs it creates.

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