Skip to content

x86, microcode: Reloading fixes

Borislav Petkov lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3x86, microcode, intel: Drop unused parameterarch/x86/kernel/cpu/microcode/intel_early.c+3 -40 replies
2/3x86, microcode: Don't initialize microcode code on paravirtarch/x86/kernel/cpu/microcode/core.c+1 -10 replies
3/3x86, microcode: Reload microcode on resumearch/x86/include/asm/microcode.h arch/x86/include/asm/microcode_amd.h arch/x86/include/asm/microcode_intel.h +4 more+84 -160 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] x86, microcode: Reloading fixes

From: Borislav Petkov <[email protected]>

Hi guys,

please pull three fixes for the microcode loader. More specifically, microcode reloading for 3.19. Patches are against tip/x86/microcode.

I have this also as a tag if you'd prefer to pull:

git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git tags/microcode_fixes_for_3.19

This will have a conflict when merging into Linus' tree after tip/x86/urgent has went in for 3.18 but resolving it should be easy. The final result should be this with the ifdef dropped:

---

arch/x86/kernel/cpu/microcode/core.c +1 -10
index 08fe6e8a726e..15c29096136b 100644
@@ -465,16 +465,8 @@ static void mc_bp_resume(void)
 
        if (uci->valid && uci->mc)
                microcode_ops->apply_microcode(cpu);
-#ifdef CONFIG_X86_64
        else if (!uci->mc)
-               /*
-                * We might resume and not have applied late microcode but still
-                * have a newer patch stashed from the early loader. We don't
-                * have it in uci->mc so we have to load it the same way we're
-                * applying patches early on the APs.
-                */
-               load_ucode_ap();
-#endif
+               reload_early_microcode();
 }
--
 

Thanks.

Boris Ostrovsky (1):
x86, microcode: Don't initialize microcode code on paravirt

Borislav Petkov (2):
x86, microcode, intel: Drop unused parameter
x86, microcode: Reload microcode on resume

 arch/x86/include/asm/microcode.h            |  2 ++
 arch/x86/include/asm/microcode_amd.h        |  2 ++
 arch/x86/include/asm/microcode_intel.h      |  2 ++
 arch/x86/kernel/cpu/microcode/amd_early.c   | 18 +++++++++++
 arch/x86/kernel/cpu/microcode/core.c        | 10 ++----
 arch/x86/kernel/cpu/microcode/core_early.c  | 21 +++++++++++++
 arch/x86/kernel/cpu/microcode/intel_early.c | 48 +++++++++++++++++++++++------
 7 files changed, 85 insertions(+), 18 deletions(-)
Signature · 1 line
2.0.0