Commit 4d902d90 authored by Josh Poimboeuf's avatar Josh Poimboeuf Committed by Greg Kroah-Hartman

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

commit 7c3658b2 upstream

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>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 56c4c99c
...@@ -111,6 +111,8 @@ void __init check_bugs(void) ...@@ -111,6 +111,8 @@ void __init check_bugs(void)
mds_select_mitigation(); mds_select_mitigation();
arch_smt_update();
#ifdef CONFIG_X86_32 #ifdef CONFIG_X86_32
/* /*
* Check whether we are able to run this kernel safely on SMP. * Check whether we are able to run this kernel safely on SMP.
...@@ -638,9 +640,6 @@ static void __init spectre_v2_select_mitigation(void) ...@@ -638,9 +640,6 @@ static void __init spectre_v2_select_mitigation(void)
/* Set up IBPB and STIBP depending on the general spectre V2 command */ /* Set up IBPB and STIBP depending on the general spectre V2 command */
spectre_v2_user_select_mitigation(cmd); spectre_v2_user_select_mitigation(cmd);
/* Enable STIBP if appropriate */
arch_smt_update();
} }
static void update_stibp_msr(void * __unused) static void update_stibp_msr(void * __unused)
......
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