]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: selftests: Use vcpu_get_cpuid_entry() in PV features test (sort of)
authorSean Christopherson <seanjc@google.com>
Tue, 14 Jun 2022 20:06:50 +0000 (20:06 +0000)
committerSean Christopherson <seanjc@google.com>
Thu, 14 Jul 2022 01:14:18 +0000 (18:14 -0700)
commitc6c48f49a249d4317cdc9e3d4a0c489864e4e524
treec99aa050506cb9c4ac9cbfde319a6b52c5617fcb
parent06a7e7129f6c17efb061eca349e7672ff54bc1c8
KVM: selftests: Use vcpu_get_cpuid_entry() in PV features test (sort of)

Add a new helper, vcpu_clear_cpuid_entry(), to do a RMW operation on the
vCPU's CPUID model to clear a given CPUID entry, and use it to clear
KVM's paravirt feature instead of operating on kvm_get_supported_cpuid()'s
static "cpuid" variable.  This also eliminates a user of
the soon-be-defunct set_cpuid() helper.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Link: https://lore.kernel.org/r/20220614200707.3315957-26-seanjc@google.com
tools/testing/selftests/kvm/include/x86_64/processor.h
tools/testing/selftests/kvm/lib/x86_64/processor.c
tools/testing/selftests/kvm/x86_64/kvm_pv_test.c