x86/virt: Drop unnecessary check on extended CPUID level in cpu_has_svm()
authorSean Christopherson <seanjc@google.com>
Fri, 21 Jul 2023 20:18:52 +0000 (13:18 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Sep 2023 10:27:59 +0000 (12:27 +0200)
commit6a43e0d623115949becf0bdcb22f8c097af855e9
tree44df1b89093cdfa89f2fe0f88e372577b4e35d29
parent6522397e7502f92f48048bca61ac82f51970404b
x86/virt: Drop unnecessary check on extended CPUID level in cpu_has_svm()

[ Upstream commit 5df8ecfe3632d5879d1f154f7aa8de441b5d1c89 ]

Drop the explicit check on the extended CPUID level in cpu_has_svm(), the
kernel's cached CPUID info will leave the entire SVM leaf unset if said
leaf is not supported by hardware.  Prior to using cached information,
the check was needed to avoid false positives due to Intel's rather crazy
CPUID behavior of returning the values of the maximum supported leaf if
the specified leaf is unsupported.

Fixes: 682a8108872f ("x86/kvm/svm: Simplify cpu_has_svm()")
Link: https://lore.kernel.org/r/20230721201859.2307736-13-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/include/asm/virtext.h