linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/16 v2] x86/microcode: 4.11 queue
@ 2017-01-20 20:29 Borislav Petkov
  2017-01-20 20:29 ` [PATCH 01/16] x86/microcode/intel: Drop stashed AP patch pointer optimization Borislav Petkov
                   ` (15 more replies)
  0 siblings, 16 replies; 33+ messages in thread
From: Borislav Petkov @ 2017-01-20 20:29 UTC (permalink / raw)
  To: X86 ML; +Cc: LKML

From: Borislav Petkov <bp@suse.de>

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(-)

-- 
2.11.0

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2017-01-23  9:43 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-20 20:29 [PATCH 00/16 v2] x86/microcode: 4.11 queue Borislav Petkov
2017-01-20 20:29 ` [PATCH 01/16] x86/microcode/intel: Drop stashed AP patch pointer optimization Borislav Petkov
2017-01-23  9:07   ` [tip:x86/mce] " tip-bot for Borislav Petkov
2017-01-20 20:29 ` [PATCH 02/16] x86/MSR: Carve out bare minimum accessors Borislav Petkov
2017-01-23  9:07   ` [tip:x86/mce] " tip-bot for Borislav Petkov
2017-01-20 20:29 ` [PATCH 03/16] x86/microcode: Convert to bare minimum MSR accessors Borislav Petkov
2017-01-23  9:08   ` [tip:x86/mce] " tip-bot for Borislav Petkov
2017-01-20 20:29 ` [PATCH 04/16] x86/microcode/AMD: Clean up find_equiv_id() Borislav Petkov
2017-01-23  9:08   ` [tip:x86/mce] " tip-bot for Borislav Petkov
2017-01-20 20:29 ` [PATCH 05/16] x86/microcode/AMD: Shorten function parameter's name Borislav Petkov
2017-01-23  9:09   ` [tip:x86/mce] " tip-bot for Borislav Petkov
2017-01-20 20:29 ` [PATCH 06/16] x86/microcode/AMD: Extend the container struct Borislav Petkov
2017-01-23  9:09   ` [tip:x86/mce] " tip-bot for Borislav Petkov
2017-01-20 20:29 ` [PATCH 07/16] x86/microcode/AMD: Rework container parsing Borislav Petkov
2017-01-23  9:10   ` [tip:x86/mce] " tip-bot for Borislav Petkov
2017-01-20 20:29 ` [PATCH 08/16] x86/microcode: Decrease CPUID use Borislav Petkov
2017-01-23  9:10   ` [tip:x86/mce] " tip-bot for Borislav Petkov
2017-01-20 20:29 ` [PATCH 09/16] x86/microcode/AMD: Get rid of global this_equiv_id Borislav Petkov
2017-01-23  9:11   ` [tip:x86/mce] " tip-bot for Borislav Petkov
2017-01-20 20:29 ` [PATCH 10/16] x86/microcode/AMD: Use find_microcode_in_initrd() Borislav Petkov
2017-01-23  9:11   ` [tip:x86/mce] " tip-bot for Borislav Petkov
2017-01-20 20:29 ` [PATCH 11/16] x86/microcode: Remove local vendor variable Borislav Petkov
2017-01-23  9:12   ` [tip:x86/mce] " tip-bot for Borislav Petkov
2017-01-20 20:29 ` [PATCH 12/16] x86/microcode/AMD: Check patch level only on the BSP Borislav Petkov
2017-01-23  9:12   ` [tip:x86/mce] " tip-bot for Borislav Petkov
2017-01-20 20:29 ` [PATCH 13/16] x86/microcode/AMD: Unify load_ucode_amd_ap() Borislav Petkov
2017-01-23  9:13   ` [tip:x86/mce] " tip-bot for Borislav Petkov
2017-01-20 20:29 ` [PATCH 14/16] x86/microcode/AMD: Simplify saving from initrd Borislav Petkov
2017-01-23  9:13   ` [tip:x86/mce] " tip-bot for Borislav Petkov
2017-01-20 20:29 ` [PATCH 15/16] x86/microcode/AMD: Remove AP scanning optimization Borislav Petkov
2017-01-23  9:14   ` [tip:x86/mce] " tip-bot for Borislav Petkov
2017-01-20 20:29 ` [PATCH 16/16] x86/microcode/AMD: Remove struct cont_desc.eq_id Borislav Petkov
2017-01-23  9:14   ` [tip:x86/mce] " tip-bot for Borislav Petkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).