]> xenbits.xensource.com Git - people/royger/xen.git/commit
x86/microcode: enable boot time (pre-Dom0) loading
authorJan Beulich <jbeulich@suse.com>
Thu, 1 Dec 2011 16:57:54 +0000 (17:57 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 1 Dec 2011 16:57:54 +0000 (17:57 +0100)
commit436fb462abf5673af105e0f2f0640a598286d0fe
tree6f1880e47cae89dcb546fa97d315a3de703dfe40
parent0bda96825f7f8fcb32a609b3d507e8f0a0adf8a2
x86/microcode: enable boot time (pre-Dom0) loading

Largely as a result of the continuing resistance of Linux maintainers
to accept a microcode loading patch for pv-ops Xen kernels, this
follows the suggested route and provides a means to load microcode
updates without the assistance of Dom0, thus also addressing eventual
problems in the hardware much earlier.

This leverages the fact that via the multiboot protocol another blob
of data can be easily added in the form of just an extra module. Since
microcode data cannot reliably be recognized by looking at the
provided data, this requires (in the non-EFI case) the use of a
command line parameter ("ucode=<number>") to identify which of the
modules is to be parsed for an eventual microcode update (in the EFI
case the module is being identified in the config file, and hence the
command line argument, if given, will be ignored).

This required to adjust the XSM module determination logic accordingly.

The format of the data to be provided is the raw binary blob already
used for AMD CPUs, and the output of the intel-microcode2ucode utility
for the Intel case (either the per-(family,model,stepping) file or -
to make things easier for distro-s integration-wise - simply the
concatenation of all of them).

In order to not convert the spin_lock() in microcode_update_cpu() (and
then obviously also all other uses on microcode_mutex) to
spin_lock_irqsave() (which would be undesirable for the hypercall
context in which the function also runs), the boot time handling gets
done using a tasklet (instead of using on_selected_cpus()).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/arch/x86/efi/boot.c
xen/arch/x86/microcode.c
xen/arch/x86/setup.c
xen/include/asm-x86/processor.h
xen/include/asm-x86/setup.h
xen/include/xsm/xsm.h
xen/xsm/xsm_core.c
xen/xsm/xsm_policy.c