All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/6] improve late microcode loading
@ 2018-11-28  5:34 Chao Gao
  2018-11-28  5:34 ` [PATCH v4 1/6] microcode/intel: extend microcode_update_match() Chao Gao
                   ` (5 more replies)
  0 siblings, 6 replies; 41+ messages in thread
From: Chao Gao @ 2018-11-28  5:34 UTC (permalink / raw)
  To: xen-devel; +Cc: Andrew Cooper, Wei Liu, Jan Beulich, Chao Gao

The intention of this series is to make the late microcode loading
more reliable by rendezvousing all cpus in stop_machine context and
updating microcode of each cpu core one-by-one. This idea comes from
Ashok. I am porting his linux patch to Xen (see patch 6 for more
detail).

This series makes two changes:
 1. Patch 1-5: introduce a global microcode cache
 2. Patch 6: synchronize late microcode loading

Currently, late microcode loading does a lot of things including
parsing microcode file, 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 file is parsed and a global microcode cache is built on
a single CPU before rendezvousing all cpus to update microcode. Other
CPUs just get a suitable microcode from the global cache and load it.
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 tests for them due to
lack of hardware. Hence it wonldn't be surprising to me if you found
some bugs on a AMD machine. Is there anyone who has a AMD machine
at hand willing to do some basic tests, like
* do a microcode update
* don't bring all pCPUs up at startup by specifying maxcpus in xen
  command line and then do a microcode update and online all
  offlined CPUs via 'xen-hptool'.

For your convenience, you can also find this series at:
	https://github.intel.com/chaogao/xen

Chao Gao (6):
  microcode/intel: extend microcode_update_match()
  microcode: save all microcodes which pass sanity check
  microcode: delete 'mc' field from struct ucode_cpu_info
  microcode: don't call apply_microcode() in cpu_request_microcode()
  microcode: delete microcode pointer and size from microcode_info
  x86/microcode: Synchronize late microcode loading

 xen/arch/x86/microcode.c        | 215 ++++++++++++++++++++++++++--------------
 xen/arch/x86/microcode_amd.c    | 183 ++++++++++++++++++----------------
 xen/arch/x86/microcode_intel.c  | 174 ++++++++++++++++++++++----------
 xen/include/asm-x86/microcode.h |  17 ++--
 4 files changed, 371 insertions(+), 218 deletions(-)

-- 
1.8.3.1


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

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

end of thread, other threads:[~2019-01-15 16:25 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-28  5:34 [PATCH v4 0/6] improve late microcode loading Chao Gao
2018-11-28  5:34 ` [PATCH v4 1/6] microcode/intel: extend microcode_update_match() Chao Gao
2018-11-28 10:58   ` Roger Pau Monné
2018-11-29  2:00     ` Chao Gao
2018-11-29  9:14       ` Roger Pau Monné
2018-11-28  5:34 ` [PATCH v4 2/6] microcode: save all microcodes which pass sanity check Chao Gao
2018-11-28 12:00   ` Roger Pau Monné
2018-11-29  2:40     ` Chao Gao
2018-11-29  9:22       ` Roger Pau Monné
2018-11-30  7:55         ` Chao Gao
2018-11-30  9:32           ` Jan Beulich
2019-01-15 15:07             ` Andrew Cooper
2018-12-04 22:39         ` Woods, Brian
2018-12-05  7:38           ` Chao Gao
2018-11-29 10:19       ` Jan Beulich
2019-01-15 15:15         ` Andrew Cooper
2018-11-28  5:34 ` [PATCH v4 3/6] microcode: delete 'mc' field from struct ucode_cpu_info Chao Gao
2018-11-28 12:32   ` Roger Pau Monné
2018-11-28  5:34 ` [PATCH v4 4/6] microcode: don't call apply_microcode() in cpu_request_microcode() Chao Gao
2018-11-28 15:02   ` Roger Pau Monné
2018-11-29  4:28     ` Chao Gao
2018-11-29  9:46       ` Roger Pau Monné
2018-11-30  8:57         ` Chao Gao
2018-11-30  9:38           ` Jan Beulich
2018-11-28  5:34 ` [PATCH v4 5/6] microcode: delete microcode pointer and size from microcode_info Chao Gao
2018-11-28 15:04   ` Roger Pau Monné
2018-11-28  5:34 ` [PATCH v4 6/6] x86/microcode: Synchronize late microcode loading Chao Gao
2018-11-28 15:22   ` Roger Pau Monné
2018-11-29  4:43     ` Chao Gao
2018-11-29  9:56       ` Roger Pau Monné
2018-11-29 22:43         ` Boris Ostrovsky
2018-11-30  9:46           ` Jan Beulich
2018-11-30 16:49             ` Boris Ostrovsky
2018-11-30  9:01         ` Chao Gao
2019-01-15 15:24           ` Andrew Cooper
2019-01-15 16:24             ` Roger Pau Monné
2018-12-11 17:01   ` Jan Beulich
2018-12-11 18:16     ` Raj, Ashok
2018-12-12  7:26       ` Jan Beulich
2018-12-13  2:10         ` Boris Ostrovsky
2018-12-12  4:53     ` Chao Gao

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.