diff options
author | Josh Poimboeuf <jpoimboe@redhat.com> | 2019-04-02 10:00:14 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-05-14 19:17:58 +0200 |
commit | b3a63d9c745318c111e6ce813a8046d8599a51c9 (patch) | |
tree | bd83fa0ffea826d9fd5b8d40f9cd4a751b9177cc | |
parent | f7a119a762efd7fcbe7546a6e20b6867ee59e0dd (diff) | |
download | linux-stable-b3a63d9c745318c111e6ce813a8046d8599a51c9.tar.gz linux-stable-b3a63d9c745318c111e6ce813a8046d8599a51c9.tar.bz2 linux-stable-b3a63d9c745318c111e6ce813a8046d8599a51c9.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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 3f70da3a4e58..6ccbcac2cb1d 100644 --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -109,6 +109,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. @@ -624,9 +626,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) |