OSDN Git Service

KVM: selftests: Add dedicated helpers for getting x86 Family and Model
authorSean Christopherson <seanjc@google.com>
Thu, 6 Oct 2022 00:51:23 +0000 (00:51 +0000)
committerSean Christopherson <seanjc@google.com>
Thu, 17 Nov 2022 00:59:06 +0000 (16:59 -0800)
commit24f3f9898e3c463b39dac8a03870c628dab8176e
treedbfcd6c0bc9fa79ec736e7aade405a49d5c2fcdd
parent5228c02a4c541a065ec071ea7ec2c1c76f3723dd
KVM: selftests: Add dedicated helpers for getting x86 Family and Model

Add dedicated helpers for getting x86's Family and Model, which are the
last holdouts that "need" raw access to CPUID information.  FMS info is
a mess and requires not only splicing together multiple values, but
requires doing so conditional in the Family case.

Provide wrappers to reduce the odds of copy+paste errors, but mostly to
allow for the eventual removal of kvm_get_supported_cpuid_entry().

No functional change intended.

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