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

Re: [Xen-devel] [RFC PATCH v6 13/12] microcode: add sequential application policy



>>> On 21.03.19 at 13:24, <sergey.dyasli@xxxxxxxxxx> wrote:
> @@ -216,6 +218,10 @@ DEFINE_PER_CPU(struct cpu_signature, cpu_sig);
>   */
>  static atomic_t cpu_in, cpu_out;
> 
> +static uint32_t application_strategy;
> +/* The next CPU to perform a ucode update */
> +static int next_cpu;

unsigned int (twice).

> --- a/xen/include/asm-x86/processor.h
> +++ b/xen/include/asm-x86/processor.h
> @@ -573,7 +573,8 @@ int rdmsr_hypervisor_regs(uint32_t idx, uint64_t *val);
>  int wrmsr_hypervisor_regs(uint32_t idx, uint64_t val);
> 
>  void microcode_set_module(unsigned int);
> -int microcode_update(XEN_GUEST_HANDLE_PARAM(const_void), unsigned long len);
> +int microcode_update(XEN_GUEST_HANDLE_PARAM(const_void), unsigned long len,
> +                     uint32_t strategy);

Again.

> --- a/xen/include/public/platform.h
> +++ b/xen/include/public/platform.h
> @@ -114,6 +114,9 @@ struct xenpf_microcode_update {
>      /* IN variables. */
>      XEN_GUEST_HANDLE(const_void) data;/* Pointer to microcode data */
>      uint32_t length;                  /* Length of microcode data. */
> +#define XENPF_microcode_parallel   0
> +#define XENPF_microcode_sequential 1
> +    uint32_t strategy;                /* Application strategy.     */
>  };

This is not a compatible extension of the interface: For 64-bit
there's no guarantee existing callers would zero the padding
field, while for 32-bit there's no padding field at all, so for an
existing, unaware caller you'd consume random data as input.

Jan



_______________________________________________
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®.