diff options
| author | Josh Poimboeuf <jpoimboe@redhat.com> | 2019-04-02 11:00:14 -0400 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2019-04-02 14:02:37 -0400 |
| commit | 7c3658b20194a5b3209a143f63bc9c643c6a3ae2 (patch) | |
| tree | cf0daadc475c4890da31040f667f21729564de2d | |
| parent | d71eb0ce109a124b0fa714832823b9452f2762cf (diff) | |
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: 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>
| -rw-r--r-- | arch/x86/kernel/cpu/bugs.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c index 9f252082a83b..3f934ffef8cf 100644 --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c | |||
| @@ -111,6 +111,8 @@ void __init check_bugs(void) | |||
| 111 | 111 | ||
| 112 | mds_select_mitigation(); | 112 | mds_select_mitigation(); |
| 113 | 113 | ||
| 114 | arch_smt_update(); | ||
| 115 | |||
| 114 | #ifdef CONFIG_X86_32 | 116 | #ifdef CONFIG_X86_32 |
| 115 | /* | 117 | /* |
| 116 | * Check whether we are able to run this kernel safely on SMP. | 118 | * Check whether we are able to run this kernel safely on SMP. |
| @@ -638,9 +640,6 @@ specv2_set_mode: | |||
| 638 | 640 | ||
| 639 | /* Set up IBPB and STIBP depending on the general spectre V2 command */ | 641 | /* Set up IBPB and STIBP depending on the general spectre V2 command */ |
| 640 | spectre_v2_user_select_mitigation(cmd); | 642 | spectre_v2_user_select_mitigation(cmd); |
| 641 | |||
| 642 | /* Enable STIBP if appropriate */ | ||
| 643 | arch_smt_update(); | ||
| 644 | } | 643 | } |
| 645 | 644 | ||
| 646 | static void update_stibp_msr(void * __unused) | 645 | static void update_stibp_msr(void * __unused) |
