Skip to content

Commit fb86b97

Browse files
suryasaimadhuKAGA-KOKO
authored andcommitted
x86, microcode: Update BSPs microcode on resume
In the situation when we apply early microcode but do *not* apply late microcode, we fail to update the BSP's microcode on resume because we haven't initialized the uci->mc microcode pointer. So, in order to alleviate that, we go and dig out the stashed microcode patch during early boot. It is basically the same thing that is done on the APs early during boot so do that too here. Tested-by: alex.schnaidt@gmail.com Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=88001 Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: <stable@vger.kernel.org> # v3.9 Signed-off-by: Borislav Petkov <bp@suse.de> Link: http://lkml.kernel.org/r/20141118094657.GA6635@pd.tnic Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
1 parent 2cd3949 commit fb86b97

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

  • arch/x86/kernel/cpu/microcode

‎arch/x86/kernel/cpu/microcode/core.c‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,14 @@ static void mc_bp_resume(void)
465465

466466
if (uci->valid && uci->mc)
467467
microcode_ops->apply_microcode(cpu);
468+
else if (!uci->mc)
469+
/*
470+
* We might resume and not have applied late microcode but still
471+
* have a newer patch stashed from the early loader. We don't
472+
* have it in uci->mc so we have to load it the same way we're
473+
* applying patches early on the APs.
474+
*/
475+
load_ucode_ap();
468476
}
469477

470478
static struct syscore_ops mc_syscore_ops = {

0 commit comments

Comments
 (0)