KVM: x86: Explicitly track feature flags that require vendor enabling
authorSean Christopherson <seanjc@google.com>
Thu, 28 Nov 2024 01:34:22 +0000 (17:34 -0800)
committerSean Christopherson <seanjc@google.com>
Wed, 18 Dec 2024 22:20:21 +0000 (14:20 -0800)
commit0fea7aa2dc6a7095fa6acc00bff2aaa108635e63
tree6bd355990d3962fc79c6d295ac8f9148781e028b
parent9b2776c7cf2bdfb6a68b121c4038e167247ad1b1
KVM: x86: Explicitly track feature flags that require vendor enabling

Add another CPUID feature macro, VENDOR_F(), and use it to track features
that KVM supports, but that need additional vendor support and so are
conditionally enabled in vendor code.

Currently, VENDOR_F() is mostly just documentation, but tracking all
KVM-supported features will allow for asserting, at build time, take),
that all features that are set, cleared, *or* checked by KVM are known to
kvm_set_cpu_caps().

To fudge around a macro collision on 32-bit kernels, #undef DS to be able
to get at X86_FEATURE_DS.

No functional change intended.

Link: https://lore.kernel.org/r/20241128013424.4096668-56-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/cpuid.c