OSDN Git Service

KVM: selftests: Refactor X86_FEATURE_* framework to prep for X86_PROPERTY_*
authorSean Christopherson <seanjc@google.com>
Thu, 6 Oct 2022 00:51:15 +0000 (00:51 +0000)
committerSean Christopherson <seanjc@google.com>
Thu, 17 Nov 2022 00:59:03 +0000 (16:59 -0800)
commitee3795536664e514196cbe7396d3eb4c9925de98
treedfa9b296d45243b09af4d5b7376da453f4354d34
parent3bd396353d18b4f4e4f9953e5f5c46b0045a5477
KVM: selftests: Refactor X86_FEATURE_* framework to prep for X86_PROPERTY_*

Refactor the X86_FEATURE_* framework to prepare for extending the core
logic to support "properties".  The "feature" framework allows querying a
single CPUID bit to detect the presence of a feature; the "property"
framework will extend the idea to allow querying a value, i.e. to get a
value that is a set of contiguous bits in a CPUID leaf.

Opportunistically add static asserts to ensure features are fully defined
at compile time, and to try and catch mistakes in the definition of
features.

No functional change intended.

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