KVM: x86: Drop unnecessary check that cpuid_entry2_find() returns right leaf
authorSean Christopherson <seanjc@google.com>
Thu, 28 Nov 2024 01:34:13 +0000 (17:34 -0800)
committerSean Christopherson <seanjc@google.com>
Wed, 18 Dec 2024 22:20:11 +0000 (14:20 -0800)
commitcfd15745260929565bc53e16fed54f9e3276c7e1
treebd90fa27365bebfbb3b919cb04fdd07d2233cd5b
parent963180ae06373c9b0d16c23491bf3bcafef1900b
KVM: x86: Drop unnecessary check that cpuid_entry2_find() returns right leaf

Drop an unnecessary check that kvm_find_cpuid_entry_index(), i.e.
cpuid_entry2_find(), returns the correct leaf when getting CPUID.0x7.0x0
to update X86_FEATURE_OSPKE.  cpuid_entry2_find() never returns an entry
for the wrong function.  And not that it matters, but cpuid_entry2_find()
will always return a precise match for CPUID.0x7.0x0 since the index is
significant.

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-47-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/cpuid.c