Re: [Xen-devel] [PATCH v9 12/15] microcode: reduce memory allocation and copy when creating a patch

2019-08-29 Thread Jan Beulich
On 19.08.2019 03:25, Chao Gao wrote: > @@ -542,29 +505,21 @@ static struct microcode_patch > *cpu_request_microcode(const void *buf, > while ( (error = get_ucode_from_buffer_amd(mc_amd, buf, bufsize, > )) == 0 ) > { > -struct

Re: [Xen-devel] [PATCH v9 12/15] microcode: reduce memory allocation and copy when creating a patch

2019-08-26 Thread Roger Pau Monné
On Mon, Aug 26, 2019 at 03:03:22PM +0800, Chao Gao wrote: > On Fri, Aug 23, 2019 at 10:11:21AM +0200, Roger Pau Monné wrote: > >On Mon, Aug 19, 2019 at 09:25:25AM +0800, Chao Gao wrote: > >> To create a microcode patch from a vendor-specific update, > >> allocate_microcode_patch() copied

Re: [Xen-devel] [PATCH v9 12/15] microcode: reduce memory allocation and copy when creating a patch

2019-08-26 Thread Chao Gao
On Fri, Aug 23, 2019 at 10:11:21AM +0200, Roger Pau Monné wrote: >On Mon, Aug 19, 2019 at 09:25:25AM +0800, 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

Re: [Xen-devel] [PATCH v9 12/15] microcode: reduce memory allocation and copy when creating a patch

2019-08-23 Thread Roger Pau Monné
On Mon, Aug 19, 2019 at 09:25:25AM +0800, 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

[Xen-devel] [PATCH v9 12/15] microcode: reduce memory allocation and copy when creating a patch

2019-08-18 Thread Chao Gao
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,