KVM: selftests: Add vcpu_set_cpuid_property() to set properties
authorJinrong Liang <cloudliang@tencent.com>
Tue, 9 Jan 2024 23:02:32 +0000 (15:02 -0800)
committerSean Christopherson <seanjc@google.com>
Tue, 30 Jan 2024 23:28:03 +0000 (15:28 -0800)
commitd7e68738e1aae940b54bfc03313e0ef5720e2e71
treee064500598ae9fbd5cfaa098434738088e186821
parenta634c76b2c1a642d11f5d6e1810181daedcbe0ab
KVM: selftests: Add vcpu_set_cpuid_property() to set properties

Add vcpu_set_cpuid_property() helper function for setting properties, and
use it instead of open coding an equivalent for MAX_PHY_ADDR.  Future vPMU
testcases will also need to stuff various CPUID properties.

Reviewed-by: Jim Mattson <jmattson@google.com>
Signed-off-by: Jinrong Liang <cloudliang@tencent.com>
Co-developed-by: Sean Christopherson <seanjc@google.com>
Tested-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Link: https://lore.kernel.org/r/20240109230250.424295-13-seanjc@google.com
Signed-off-by: Sean Christopherson <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/smaller_maxphyaddr_emulation_test.c