On 11.08.2022 12:59, Ross Lagerwall wrote:
> This should only be called for the boot CPU to avoid calling _init code
> after it has been unloaded.
> 
> Fixes: 062868a5a8b4 ("x86/amd: Work around CLFLUSH ordering on older parts")
> Signed-off-by: Ross Lagerwall <[email protected]>

Reviewed-by: Jan Beulich <[email protected]>
albeit ...

> --- a/xen/arch/x86/cpu/amd.c
> +++ b/xen/arch/x86/cpu/amd.c
> @@ -845,7 +845,7 @@ static void cf_check init_amd(struct cpuinfo_x86 *c)
>        * everything, including reads and writes to address, and
>        * LFENCE/SFENCE instructions.
>        */
> -     if (!cpu_has_clflushopt)
> +     if (c == &boot_cpu_data && !cpu_has_clflushopt)

... I would have put the two sides of the && the other way around.

Jan

Reply via email to