[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v5 0/8] improve late microcode loading



Changes in this version:
 - support parallel microcode updates for all cores (see patch 8)
 - Address Roger's comments on the last version.

The intention of this series is to make the late microcode loading
more reliable by rendezvousing all cpus in stop_machine context.
This idea comes from Ashok. I am porting his linux patch to Xen
(see patch 7 for more details).

This series makes three changes:
 1. Patch 1-6: introduce a global microcode cache
 2. Patch 7: synchronize late microcode loading
 3. Patch 8: support parallel microcodes update on different cores

Currently, late microcode loading does a lot of things including
parsing microcode blob, checking the signature/revision and performing
update. Putting all of them into stop_machine context is a bad idea
because of complexity (One issue I observed is memory allocation
triggered one assertion in stop_machine context). In order to simplify
the load process, I move parsing microcode out of the load process.
The microcode blob is parsed and a global microcode cache is built on
a single CPU before rendezvousing all cpus to update microcode. Other
CPUs just get and load a suitable microcode from the global cache.
With this global cache, it is safe to put simplified load process to
stop_machine context.

Regarding changes to AMD side, I didn't do any test for them due to
lack of hardware. Could you help to test this series on an AMD machine?
At least, two basic tests are needed:
* do a microcode update after system bootup
* don't bring all pCPUs up at bootup by specifying maxcpus option in xen
  command line and then do a microcode update and online all offlined
  CPUs via 'xen-hptool'.

Chao Gao (8):
  microcode/intel: remove redundent check against ucode size
  microcode/intel: extend microcode_update_match()
  microcode: introduce the global microcode cache
  microcode: delete 'mc' field from struct ucode_cpu_info
  microcode: split out apply_microcode() from cpu_request_microcode()
  microcode: delete microcode pointer and size from microcode_info
  x86/microcode: Synchronize late microcode loading
  microcode: update microcode on cores in parallel

 xen/arch/x86/microcode.c        | 336 ++++++++++++++++++++++++++--------------
 xen/arch/x86/microcode_amd.c    | 202 ++++++++++++------------
 xen/arch/x86/microcode_intel.c  | 139 +++++++++--------
 xen/include/asm-x86/microcode.h |  25 ++-
 4 files changed, 416 insertions(+), 286 deletions(-)

-- 
1.8.3.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.