summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@redhat.com>2019-04-02 10:00:14 -0500
committerBen Hutchings <ben@decadent.org.uk>2019-05-22 23:15:24 +0100
commit5d2673f7a47a339eb98049d02a5c0f39073c0baa (patch)
tree1b278b509983930bee00352f09c506f64d278f6e /arch
parentdad731a6b3c7c62998ce34f8f877d6b9b52f2fe5 (diff)
x86/speculation: Move arch_smt_update() call to after mitigation decisions
commit 7c3658b20194a5b3209a143f63bc9c643c6a3ae2 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: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Tyler Hicks <tyhicks@canonical.com> Acked-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/cpu/bugs.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index c256c38ad432..e1ed6c51f866 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -161,6 +161,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.
@@ -677,9 +679,6 @@ specv2_set_mode:
/* Set up IBPB and STIBP depending on the general spectre V2 command */
spectre_v2_user_select_mitigation(cmd);
-
- /* Enable STIBP if appropriate */
- arch_smt_update();
}
static void update_stibp_msr(void * __unused)