Skip to content

x86/microcode: 4.11 queue

Borislav Petkov lkml 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest16 patches 0 repliesNew
  2. v113 patches 24 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/16x86/microcode/intel: Drop stashed AP patch pointer optimizationarch/x86/kernel/cpu/microcode/intel.c+1 -80 replies
2/16x86/MSR: Carve out bare minimum accessorsarch/x86/include/asm/apic.h arch/x86/include/asm/msr.h+32 -210 replies
3/16x86/microcode: Convert to bare minimum MSR accessorsarch/x86/include/asm/microcode.h+4 -50 replies
4/16x86/microcode/AMD: Clean up find_equiv_id()arch/x86/kernel/cpu/microcode/amd.c+5 -120 replies
5/16x86/microcode/AMD: Shorten function parameter's namearch/x86/kernel/cpu/microcode/amd.c+3 -30 replies
6/16x86/microcode/AMD: Extend the container structarch/x86/kernel/cpu/microcode/amd.c+15 -110 replies
7/16x86/microcode/AMD: Rework container parsingarch/x86/kernel/cpu/microcode/amd.c+105 -1330 replies
8/16x86/microcode: Decrease CPUID usearch/x86/kernel/cpu/microcode/amd.c arch/x86/kernel/cpu/microcode/core.c+38 -520 replies
9/16x86/microcode/AMD: Get rid of global this_equiv_idarch/x86/kernel/cpu/microcode/amd.c+1 -40 replies
10/16x86/microcode/AMD: Use find_microcode_in_initrd()arch/x86/kernel/cpu/microcode/amd.c+5 -110 replies
11/16x86/microcode: Remove local vendor variablearch/x86/kernel/cpu/microcode/core.c+4 -60 replies
12/16x86/microcode/AMD: Check patch level only on the BSParch/x86/include/asm/microcode_amd.h arch/x86/kernel/cpu/microcode/amd.c arch/x86/kernel/cpu/microcode/core.c+52 -690 replies
13/16x86/microcode/AMD: Unify load_ucode_amd_ap()arch/x86/kernel/cpu/microcode/amd.c+31 -500 replies
14/16x86/microcode/AMD: Simplify saving from initrdarch/x86/kernel/cpu/microcode/amd.c+13 -300 replies
15/16x86/microcode/AMD: Remove AP scanning optimizationarch/x86/kernel/cpu/microcode/amd.c+18 -600 replies
16/16x86/microcode/AMD: Remove struct cont_desc.eq_idarch/x86/kernel/cpu/microcode/amd.c+4 -100 replies

Reviews trailers per patch

9 of 16 patches have a Reviewed-by or Acked-by.

PatchThomas Gleixner
1/16R-b
2/16R-b
3/16
4/16
5/16R-b
6/16R-b
7/16
8/16R-b
9/16R-b
10/16R-b
11/16
12/16
13/16
14/16R-b
15/16R-b
16/16

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH 00/16 v2] x86/microcode: 4.11 queue

From: Borislav Petkov <[email protected]>

Hi,

here's v2 incorporating all feedback from tglx. As a result, the final version has gotten even cleaner. To the point that I might even start sharing code between the Intel and AMD side. We'll see how ugly it gets.

Btw, 1/16 needs to go to tip/x86/urgent as it is another fix for the loading rework that went in in 4.10.

Please queue the rest for 4.11.

Thanks.

Changelog:

v1:

so this is more of a lessons-learned pile after the rewriting of the whole patch loading method and not caching addresses. It largely simplifies the loader - just look at the diffstat - without any functionality loss (I hope :-)). The driver is also very much readable now with unified, common paths where possible.

What is more, 6/13 reworks the whole AMD container parsing into much more readable separation of functionality and functions doing only one thing properly.

13/13 is also another nice simplification for the AP update path which looks almost straightforward in comparison with what we had before.

All has been tested on a lot of boxes and in different configurations:

* builtin vs initrd microcode
* old microcode_ctl application method for Intel
* "echo 1 > /sys/devices/system/cpu/microcode/reload" late method
* CONFIG_RANDOMIZE_MEMORY

both on Intel and AMD machines.

Borislav Petkov (16):
x86/microcode/intel: Drop stashed AP patch pointer optimization x86/MSR: Carve out bare minimum accessors x86/microcode: Convert to bare minimum MSR accessors x86/microcode/AMD: Clean up find_equiv_id() x86/microcode/AMD: Shorten function parameter's name x86/microcode/AMD: Extend the container struct x86/microcode/AMD: Rework container parsing x86/microcode: Decrease CPUID use
x86/microcode/AMD: Get rid of global this_equiv_id x86/microcode/AMD: Use find_microcode_in_initrd() x86/microcode: Remove local vendor variable x86/microcode/AMD: Check patch level only on the BSP x86/microcode/AMD: Unify load_ucode_amd_ap() x86/microcode/AMD: Simplify saving from initrd x86/microcode/AMD: Remove AP scanning optimization x86/microcode/AMD: Remove struct cont_desc.eq_id

 arch/x86/include/asm/apic.h           |   2 +-
 arch/x86/include/asm/microcode.h      |   9 +-
 arch/x86/include/asm/microcode_amd.h  |   2 -
 arch/x86/include/asm/msr.h            |  51 ++--
 arch/x86/kernel/cpu/microcode/amd.c   | 500 +++++++++++-----------------------
 arch/x86/kernel/cpu/microcode/core.c  |  81 ++++--
 arch/x86/kernel/cpu/microcode/intel.c |   9 +-
 7 files changed, 250 insertions(+), 404 deletions(-)
Signature · 1 line
2.11.0