Commit bc3cd399 authored by Josh Poimboeuf's avatar Josh Poimboeuf Committed by Stefan Bader

x86/speculation: Move arch_smt_update() call to after mitigation decisions

arch_smt_update() now has a dependency on both Spectre v2 and MDS
mitigations.  Move its initial call to after all the mitigation decisions
have been made.
Signed-off-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Reviewed-by: default avatarTyler Hicks <tyhicks@canonical.com>
Acked-by: default avatarJiri Kosina <jkosina@suse.cz>

CVE-2018-12126
CVE-2018-12127
CVE-2018-12130

(backported from commit 7c3658b2)
[juergh: Adjusted context.]
Signed-off-by: default avatarJuerg Haefliger <juergh@canonical.com>
Acked-by: default avatarTyler Hicks <tyhicks@canonical.com>
Acked-by: default avatarStefan Bader <stefan.bader@canonical.com>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
parent 2bf050d0
......@@ -122,6 +122,8 @@ void __init check_bugs(void)
mds_select_mitigation();
arch_smt_update();
#ifdef CONFIG_X86_32
/*
* Check whether we are able to run this kernel safely on SMP.
......@@ -510,8 +512,6 @@ static void __init spectre_v2_select_mitigation(void)
mode != SPECTRE_V2_RETPOLINE_AMD)
set_ibrs_enabled(1); /* Enable IBRS */
}
arch_smt_update();
}
/* Update the static key controlling the MDS CPU buffer clear in idle */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment