Skip to content

Commit

Permalink
x86/speculation: Move arch_smt_update() call to after mitigation deci…
Browse files Browse the repository at this point in the history
…sions

commit 7c3658b 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>
  • Loading branch information
jpoimboe authored and bwhacks committed May 22, 2019
1 parent dad731a commit 5d2673f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions arch/x86/kernel/cpu/bugs.c
Expand Up @@ -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.
Expand Down Expand Up @@ -677,9 +679,6 @@ static void __init spectre_v2_select_mitigation(void)

/* 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)
Expand Down

0 comments on commit 5d2673f

Please sign in to comment.