summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2023-07-21 13:18:52 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-09-23 10:48:12 +0200
commit10c9dce4bb2ba5d6b1bad49d86543040831dfa58 (patch)
tree301c7f46d5babec92cc92e23c90fcedfe4ea5724
parent8069aebe90313a71849a2171ed72354e279a8069 (diff)
downloadlinux-stable-10c9dce4bb2ba5d6b1bad49d86543040831dfa58.tar.gz
linux-stable-10c9dce4bb2ba5d6b1bad49d86543040831dfa58.tar.bz2
linux-stable-10c9dce4bb2ba5d6b1bad49d86543040831dfa58.zip
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>
-rw-r--r--arch/x86/include/asm/virtext.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/arch/x86/include/asm/virtext.h b/arch/x86/include/asm/virtext.h
index 4699acd602af..62810550024d 100644
--- a/arch/x86/include/asm/virtext.h
+++ b/arch/x86/include/asm/virtext.h
@@ -89,12 +89,6 @@ static inline int cpu_has_svm(const char **msg)
return 0;
}
- if (boot_cpu_data.extended_cpuid_level < SVM_CPUID_FUNC) {
- if (msg)
- *msg = "can't execute cpuid_8000000a";
- return 0;
- }
-
if (!boot_cpu_has(X86_FEATURE_SVM)) {
if (msg)
*msg = "svm not available";