]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: selftests: Add helpers to get and modify a vCPU's CPUID entries
authorSean Christopherson <seanjc@google.com>
Tue, 14 Jun 2022 20:06:47 +0000 (20:06 +0000)
committerSean Christopherson <seanjc@google.com>
Thu, 14 Jul 2022 01:14:16 +0000 (18:14 -0700)
commit597efe6f97009456aa1b9c599122a64869d3332f
tree5706b98b5128d4d2eb8b45793f549589c5dfa3e1
parentf7b304975026cfb52806dbcbd3037984cbdbe013
KVM: selftests: Add helpers to get and modify a vCPU's CPUID entries

Add helpers to get a specific CPUID entry for a given vCPU, and to toggle
a specific CPUID-based feature for a vCPU.  The helpers will reduce the
amount of boilerplate code needed to tweak a vCPU's CPUID model, improve
code clarity, and most importantly move tests away from modifying the
static "cpuid" returned by kvm_get_supported_cpuid().

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