]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: selftests: Add vcpu_get() to retrieve and assert on vCPU existence
authorSean Christopherson <seanjc@google.com>
Tue, 15 Feb 2022 19:31:16 +0000 (11:31 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 11 Jun 2022 14:18:05 +0000 (10:18 -0400)
commitc8002401b26bf2ace788e515b86988841ef47e3a
treeb94a4e579fe190cc455bd163c4f85ac6543819e5
parent1de9e2cc55341463e25112cecf912a10fc3545dd
KVM: selftests: Add vcpu_get() to retrieve and assert on vCPU existence

Add vcpu_get() to wrap vcpu_find() and deduplicate a pile of code that
asserts the requested vCPU exists.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/lib/kvm_util.c
tools/testing/selftests/kvm/lib/kvm_util_internal.h
tools/testing/selftests/kvm/lib/s390x/processor.c
tools/testing/selftests/kvm/lib/x86_64/processor.c