KVM: x86: Do reverse CPUID sanity checks in __feature_leaf()
authorSean Christopherson <seanjc@google.com>
Thu, 28 Nov 2024 01:33:47 +0000 (17:33 -0800)
committerSean Christopherson <seanjc@google.com>
Wed, 18 Dec 2024 22:19:42 +0000 (14:19 -0800)
commit6416b0fb1660eb8bb73dc35dd5beb844646cb603
tree73eb8230ebcf0dcd7e98890a0ce7163ef3b42710
parentf21958e328a9e5813562bfb822e674833a3ca36b
KVM: x86: Do reverse CPUID sanity checks in __feature_leaf()

Do the compile-time sanity checks on reverse_cpuid in __feature_leaf() so
that higher level APIs don't need to "manually" perform the sanity checks.

No functional change intended.

Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Link: https://lore.kernel.org/r/20241128013424.4096668-21-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/cpuid.h
arch/x86/kvm/reverse_cpuid.h