KVM: selftests: Convert debug_regs away from VCPU_ID
authorSean Christopherson <seanjc@google.com>
Wed, 16 Feb 2022 01:06:02 +0000 (17:06 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 11 Jun 2022 15:46:53 +0000 (11:46 -0400)
commit28039449b83e21f741937e84d4fd6485ad4fb9f8
treeada9fa0d1e155158cdbd56e54cac79b390837933
parent42975c219975f5df0d686868e8b57698b2d09561
KVM: selftests: Convert debug_regs away from VCPU_ID

Convert debug_regs to use vm_create_with_one_vcpu() and pass around a
'struct kvm_vcpu' object instead of using a global VCPU_ID.

Opportunstically drop the CLEAR_DEBUG/APPLY_DEBUG macros as they only
obfuscate the code, e.g. operating on local variables not "passed" to the
macro is all kinds of confusing.

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