summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@redhat.com>2019-04-02 10:00:14 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-14 19:19:41 +0200
commit98c4b3c2ee37ca65d72d23243b621006b69158fd (patch)
tree7ff0547ff664d79ffbdd31722a840f8f7c49681b
parentx86/speculation/mds: Add mds=full,nosmt cmdline option (diff)
downloadlinux-stable-98c4b3c2ee37ca65d72d23243b621006b69158fd.tar.xz
linux-stable-98c4b3c2ee37ca65d72d23243b621006b69158fd.zip
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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 a8bef0a24390..a725105a49d1 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -108,6 +108,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.
@@ -632,9 +634,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)