Re: [patch 02/38] x86/cpu: Use native_wrmsrl() in load_percpu_segment()

Thomas Gleixner
2022-07-17T20:13:17Z

On Sun, Jul 17 2022 at 22:08, Thomas Gleixner wrote:
> On Sun, Jul 17 2022 at 21:08, Thomas Gleixner wrote:
> loadsegment_simple() was a red herring. The gs segment is already zero.
>
> So what explodes here is the early boot when switching from early per
> CPU to the real per CPU area.
>
> start_kernel()
> .....
> setup_per_cpu_areas();
> smp_prepare_boot_cpu()

Bah. switch_to_new_gdt() is already invoked from setup_per_cpu_areas()
and then again in smp_prepare_boot_cpu() and once more in cpu_init(),

What a mess.