]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commita415d08ba8bd1e4704181217b98602049f1630dc
treec680670cd26152ac9fdbd4b36df124eebd27fddb
parent534be4f7d8db950b9069ffc05b6067bb5834ead2
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