Re: [PATCH v2 1/2] x86/cpu: Disable CR pinning during CPU bringup
From: Nikunj A. Dadhania
Date: Tue Mar 17 2026 - 00:14:37 EST
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?
Regards,
Nikunj