diff options
author | Jan Beulich <jbeulich@suse.com> | 2011-12-01 17:57:54 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2011-12-01 17:57:54 +0100 |
commit | 436fb462abf5673af105e0f2f0640a598286d0fe (patch) | |
tree | 6f1880e47cae89dcb546fa97d315a3de703dfe40 /xen/include/xsm | |
parent | 0bda96825f7f8fcb32a609b3d507e8f0a0adf8a2 (diff) | |
download | xen-436fb462abf5673af105e0f2f0640a598286d0fe.tar.gz xen-436fb462abf5673af105e0f2f0640a598286d0fe.tar.bz2 xen-436fb462abf5673af105e0f2f0640a598286d0fe.zip |
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>
Diffstat (limited to 'xen/include/xsm')
-rw-r--r-- | xen/include/xsm/xsm.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/xen/include/xsm/xsm.h b/xen/include/xsm/xsm.h index 1f70e87c50..d294f2a51d 100644 --- a/xen/include/xsm/xsm.h +++ b/xen/include/xsm/xsm.h @@ -454,14 +454,15 @@ static inline long __do_xsm_op (XEN_GUEST_HANDLE(xsm_op_t) op) } #ifdef XSM_ENABLE -extern int xsm_init(unsigned int *initrdidx, const multiboot_info_t *mbi, +extern int xsm_init(unsigned long *module_map, const multiboot_info_t *mbi, void *(*bootstrap_map)(const module_t *)); -extern int xsm_policy_init(unsigned int *initrdidx, const multiboot_info_t *mbi, +extern int xsm_policy_init(unsigned long *module_map, + const multiboot_info_t *mbi, void *(*bootstrap_map)(const module_t *)); extern int register_xsm(struct xsm_operations *ops); extern int unregister_xsm(struct xsm_operations *ops); #else -static inline int xsm_init (unsigned int *initrdidx, +static inline int xsm_init (unsigned long *module_map, const multiboot_info_t *mbi, void *(*bootstrap_map)(const module_t *)) { |