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

Re: [Xen-devel] [PATCH v7 09/10] microcode: remove microcode_update_lock



On Mon, May 27, 2019 at 04:31:30PM +0800, Chao Gao wrote:
> microcode_update_lock is to prevent logic threads of a same core from
> updating microcode at the same time. But due to using a global lock, it
> also prevented parallel microcode updating on different cores.

Oh, OK, so that's what I was missing from patch 8 and what serializes
the updating.

> Remove this lock in order to update microcode in parallel. It is safe
> because we have already ensured serialization of sibling threads at the
> caller side.

Then you certainly need to fix the wait loop in do_microcode_update to
only wait for MICROCODE_UPDATE_TIMEOUT_US regardless of the number of
CPUs in the system?

> 1.For late microcode update, do_microcode_update() ensures that only one
>   sibiling thread of a core can update microcode.
> 2.For microcode update during system startup or CPU-hotplug,
>   microcode_mutex() guarantees update serialization of logical threads.
> 3.get/put_cpu_bitmaps() prevents the concurrency of CPU-hotplug and
>   late microcode update.
> 
> Note that printk in apply_microcode() and svm_host_osvm_init() (for AMD
> only) are still processed sequentially.
> 
> Signed-off-by: Chao Gao <chao.gao@xxxxxxxxx>

Patch LGTM, but it needs to fix the wait loop in do_microcode_update.

Thanks, Roger.

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