Skip to content

Commit

Permalink
x86/speculation/mds: Add 'mitigations=' support for MDS
Browse files Browse the repository at this point in the history
commit 5c14068 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>
[bwh: Backported to 3.16:
 - Drop the auto,nosmt option, which we can't support
 - Adjust filenames, context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
  • Loading branch information
Josh Poimboeuf authored and Ben Hutchings committed May 22, 2019
1 parent ac8b525 commit 4265ee7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1920,6 +1920,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
nospectre_v2 [X86]
spectre_v2_user=off [X86]
spec_store_bypass_disable=off [X86]
mds=off [X86]

auto (default)
Mitigate all CPU vulnerabilities, but leave SMT
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/kernel/cpu/bugs.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,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;
}
Expand Down

0 comments on commit 4265ee7

Please sign in to comment.