KVM: x86: Add a macro to init CPUID features that are 64-bit only
authorSean Christopherson <seanjc@google.com>
Thu, 28 Nov 2024 01:33:51 +0000 (17:33 -0800)
committerSean Christopherson <seanjc@google.com>
Wed, 18 Dec 2024 22:19:47 +0000 (14:19 -0800)
commit6eac4d99a9677a35947aa115bbc60266def40c3e
tree8cf585a413b76e8d3f2bf9556867f4a9bb793031
parent3cc359ca29adadb94f4551b0cf40bb2352c28361
KVM: x86: Add a macro to init CPUID features that are 64-bit only

Add a macro to mask-in feature flags that are supported only on 64-bit
kernels/KVM.  In addition to reducing overall #ifdeffery, using a macro
will allow hardening the kvm_cpu_cap initialization sequences to assert
that the features being advertised are indeed included in the word being
initialized.  And arguably using *F() macros through is more readable.

No functional change intended.

Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Link: https://lore.kernel.org/r/20241128013424.4096668-25-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/cpuid.c