[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v10 11/16] microcode: reduce memory allocation and copy when creating a patch
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.gao@xxxxxxxxx> > Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> > @@ -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@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |