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

Re: [Xen-devel] [RFC PATCH v1] microcode: Scan the initramfs payload for microcode blob.



>>> On 12.07.13 at 16:25, Konrad Rzeszutek Wilk <konrad@xxxxxxxxxx> wrote:
> --- a/docs/misc/xen-command-line.markdown
> +++ b/docs/misc/xen-command-line.markdown
> @@ -760,6 +760,18 @@ only available on 32-bit x86 platforms.
>  
>  `acpi` instructs Xen to reboot the host using RESET_REG in the ACPI FADT.
>  
> +### scan_ucode
> +> `= <boolean>`
> +
> +> Default: `true`
> +
> +Flag to globally enable or disable support for scanning the multiboot images
> +for an cpio image that contains microcode, which are:
> + on Intel: kernel/x86/microcode/GenuineIntel.bin
> + on AMD  : kernel/x86/microcode/AuthenticAMD.bin
> +
> +Note that is 'ucode' parameter is used this option becomes disabled.
> +

I would want this to be an extension of the "ucode=" option, not
an independent new one. E.g. "ucode=initrd" or
"ucode=cpio:<num>" or some such.

> --- a/xen/arch/x86/microcode.c
> +++ b/xen/arch/x86/microcode.c
> @@ -39,12 +39,33 @@
>  #include <asm/setup.h>
>  #include <asm/microcode.h>
>  
> +#include <xen/earlycpio.h>
> +
>  static module_t __initdata ucode_mod;
>  static void *(*__initdata ucode_mod_map)(const module_t *);
>  static signed int __initdata ucode_mod_idx;
>  static bool_t __initdata ucode_mod_forced;
>  static cpumask_t __initdata init_mask;
>  
> +/*
> + * If we scan the initramfs.cpio for the early microcode code
> + * and find it, then 'ucode_blob' will contain the pointer
> + * and the size of said blob. It is allocated from Xen's heap
> + * memory.
> + */
> +struct ucode_mod_blob {
> +    void *data;
> +    size_t size;
> +};
> +
> +static struct ucode_mod_blob __initdata ucode_blob;
> +/*
> + * By default we will parse the multiboot modules to see if there is
> + * cpio image with the microcode images.
> + */
> +static bool_t __initdata opt_scan_ucode = 1;
> +boolean_param("scan_ucode", opt_scan_ucode);

I'm also unsure we really want this on by default. "ucode=<num>"
also isn't having any "default on" effect.

Reviewing the rest of the patch requires clarification on the
concept first, as asked for in response to the "overview" mail.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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