[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7f08850c-6ddb-42f1-b2c9-0057e175b6e1@roeck-us.net>
Date: Fri, 22 Mar 2024 14:41:02 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>, x86@...nel.org,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [patch 1/4] x86/cpu: Ensure that CPU info updates are propagated
on UP
On Fri, Mar 22, 2024 at 07:56:35PM +0100, Thomas Gleixner wrote:
> The boot sequence evaluates CPUID information twice:
>
> 1) During early boot
>
> 2) When finalizing the early setup right before
> mitigations are selected and alternatives are patched.
>
> In both cases the evaluation is stored in boot_cpu_data, but on UP the
> copying of boot_cpu_data to the per CPU info of the boot CPU happens
> between #1 and #2. So any update which happens in #2 is never propagated to
> the per CPU info instance.
>
> Consolidate the whole logic and copy boot_cpu_data right before applying
> alternatives as that's the point where boot_cpu_data is in it's final state
> and not supposed to change anymore.
>
> This also removes the voodoo mb() from smp_prepare_cpus_common() which had
> absolutely no purpose.
>
> Fixes: 71eb4893cfaf ("x86/percpu: Cure per CPU madness on UP")
> Reported-by: Guenter Roeck <linux@...ck-us.net>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Tested-by: Guenter Roeck <linux@...ck-us.net>
Guenter
Powered by blists - more mailing lists