On 12.09.2019 09:22, Chao Gao wrote:
> To create a microcode patch from a vendor-specific update,
> allocate_microcode_patch() copied everything from the update.
> It is not efficient. Essentially, we just need to go through
> ucodes in the blob, find the one with the newest revision and
> install it into the microcode_patch. In the process, buffers
> like mc_amd, equiv_cpu_table (on AMD side), and mc (on Intel
> side) can be reused. microcode_patch now is allocated after
> it is sure that there is a matching ucode.
> 
> Signed-off-by: Chao Gao <chao....@intel.com>
> Reviewed-by: Roger Pau Monné <roger....@citrix.com>

Reviewed-by: Jan Beulich <jbeul...@suse.com>

> @@ -353,8 +334,9 @@ static int apply_microcode(const struct microcode_patch 
> *patch)
>      return 0;
>  }
>  
> -static long get_next_ucode_from_buffer(void **mc, const u8 *buf,
> -                                       unsigned long size, long offset)
> +static long get_next_ucode_from_buffer(struct microcode_intel **mc,
> +                                       const u8 *buf, unsigned long size,
> +                                       long offset)

As you touch this anyway, it would have been nice if you had
taken the time to correct the one or two style issues here
(u8 -> uint8_t and likely long -> unsigned long).

Jan

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

Reply via email to