Re: [Xen-devel] [PATCH v9 13/15] x86/microcode: Synchronize late microcode loading

2019-08-29 Thread Chao Gao
On Thu, Aug 29, 2019 at 02:06:39PM +0200, Jan Beulich wrote: >On 19.08.2019 03:25, Chao Gao wrote: >> + >> +static int master_thread_fn(const struct microcode_patch *patch) >> +{ >> +unsigned int cpu = smp_processor_id(); >> +int ret = 0; >> + >> +while ( loading_state !=

Re: [Xen-devel] [PATCH v9 13/15] x86/microcode: Synchronize late microcode loading

2019-08-29 Thread Jan Beulich
On 19.08.2019 03:25, Chao Gao wrote: > @@ -232,6 +276,34 @@ bool microcode_update_cache(struct microcode_patch > *patch) > return true; > } > > +/* Wait for a condition to be met with a timeout (us). */ > +static int wait_for_condition(int (*func)(void *data), void *data, > +

Re: [Xen-devel] [PATCH v9 13/15] x86/microcode: Synchronize late microcode loading

2019-08-19 Thread Chao Gao
On Mon, Aug 19, 2019 at 11:27:36AM +0100, Sergey Dyasli wrote: >> +static int master_thread_fn(const struct microcode_patch *patch) >> +{ >> +unsigned int cpu = smp_processor_id(); >> +int ret = 0; >> + >> +while ( loading_state != LOADING_CALLIN ) >> +cpu_relax(); >> + >> +

Re: [Xen-devel] [PATCH v9 13/15] x86/microcode: Synchronize late microcode loading

2019-08-19 Thread Sergey Dyasli
On 19/08/2019 02:25, Chao Gao wrote: > This patch ports microcode improvement patches from linux kernel. > > Before you read any further: the early loading method is still the > preferred one and you should always do that. The following patch is > improving the late loading mechanism for long

[Xen-devel] [PATCH v9 13/15] x86/microcode: Synchronize late microcode loading

2019-08-18 Thread Chao Gao
This patch ports microcode improvement patches from linux kernel. Before you read any further: the early loading method is still the preferred one and you should always do that. The following patch is improving the late loading mechanism for long running jobs and cloud use cases. Gather all