diff options
author | Josh Poimboeuf <jpoimboe@redhat.com> | 2019-04-17 16:39:02 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-05-14 19:17:59 +0200 |
commit | 12a0dad799fbcc94884289f5c9b0ce3a5c77e84d (patch) | |
tree | e205ed6b6cf1ea22229c00bcac05d73b8bab8b78 /arch | |
parent | 59a14fb5832c370c63ab483f4f3718a0f729c7f5 (diff) | |
download | linux-stable-12a0dad799fbcc94884289f5c9b0ce3a5c77e84d.tar.gz linux-stable-12a0dad799fbcc94884289f5c9b0ce3a5c77e84d.tar.bz2 linux-stable-12a0dad799fbcc94884289f5c9b0ce3a5c77e84d.zip |
x86/speculation/mds: Add 'mitigations=' support for MDS
commit 5c14068f87d04adc73ba3f41c2a303d3c3d1fa12 upstream
Add MDS to the new 'mitigations=' cmdline option.
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/cpu/bugs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c index 904d55cf80a2..9b096f26d1c8 100644 --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -231,7 +231,7 @@ static const char * const mds_strings[] = { static void __init mds_select_mitigation(void) { - if (!boot_cpu_has_bug(X86_BUG_MDS)) { + if (!boot_cpu_has_bug(X86_BUG_MDS) || cpu_mitigations_off()) { mds_mitigation = MDS_MITIGATION_OFF; return; } @@ -242,7 +242,8 @@ static void __init mds_select_mitigation(void) static_branch_enable(&mds_user_clear); - if (mds_nosmt && !boot_cpu_has(X86_BUG_MSBDS_ONLY)) + if (!boot_cpu_has(X86_BUG_MSBDS_ONLY) && + (mds_nosmt || cpu_mitigations_auto_nosmt())) cpu_smt_disable(false); } |