Re: [PATCH v2 1/2] x86/cpu: Disable CR pinning during CPU bringup

From: Dave Hansen

Date: Tue Mar 17 2026 - 11:33:55 EST


On 3/16/26 21:12, Nikunj A. Dadhania wrote:
> On 3/17/2026 3:13 AM, Dave Hansen wrote:
>> Either we change how alternatives patching works, we use some other
>> exception code, or we try and get CR4.FSGSBASE established as early as
>> possible on the secondaries.
> Right, I moved FSGSBASE enablement to cpu_init_exception_handling() to
> establish it early:
>
> https://lore.kernel.org/all/1439b4f4-ff0c-4b6a-ac86-5c0da2d26cf5@xxxxxxx
>
> This:
> 1) Enables FSGSBASE early for secondary CPUs before any exceptions occur
> 2) Consolidates initialization for both boot and secondary CPUs in one place
> 3) Eliminates the double-enable issue as in cr4_init()/identify_cpu()
>
> Does this approach look good to you?

After sleeping on it, yes, this looks good to me.

Please resend this with a full changelog and so forth, and I think we
can move forward with it.