summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/process.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2022-03-15 12:52:51 +0100
committerIngo Molnar <mingo@kernel.org>2022-03-15 12:52:51 +0100
commit9cea0d46f52f31c077a83a9b9e4e3887adfbecbe (patch)
tree3910cec9563476f23108de6618ad55cf0c87e62a /arch/x86/kernel/process.c
parent8c490b42fe91c10d5756efe56014240c669e7720 (diff)
parent08f253ec3767bcfafc5d32617a92cee57c63968e (diff)
downloadlinux-9cea0d46f52f31c077a83a9b9e4e3887adfbecbe.tar.gz
linux-9cea0d46f52f31c077a83a9b9e4e3887adfbecbe.tar.bz2
linux-9cea0d46f52f31c077a83a9b9e4e3887adfbecbe.zip
Merge branch 'x86/cpu' into x86/core, to resolve conflicts
Conflicts: arch/x86/include/asm/cpufeatures.h Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/process.c')
-rw-r--r--arch/x86/kernel/process.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index a057a5c08618..b370767f5b19 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -765,8 +765,11 @@ void __noreturn stop_this_cpu(void *dummy)
* without the encryption bit, they don't race each other when flushed
* and potentially end up with the wrong entry being committed to
* memory.
+ *
+ * Test the CPUID bit directly because the machine might've cleared
+ * X86_FEATURE_SME due to cmdline options.
*/
- if (boot_cpu_has(X86_FEATURE_SME))
+ if (cpuid_eax(0x8000001f) & BIT(0))
native_wbinvd();
for (;;) {
/*