Re: [PATCH] x86/apic: Switch to x2apic driver early if x2apic is enabled

From: Thomas Gleixner

Date: Fri Sep 11 2026 - 08:51:44 EST


On Thu, Sep 10 2026 at 09:04, Grzegorz Jaszczyk wrote:
> To prevent this, check if x2apic is enabled in hardware during early APIC
> call setup in apic_setup_apic_calls() and switch the default APIC driver
> from apic_physflat to apic_x2apic_phys immediately. This ensures that any
> early EOI writes use safe MSR-based accesses. The driver can still be
> upgraded later during the normal APIC probe phase.

That's really the wrong place. Initializing those calls has absolutely
nothing to do with the driver probing.

There is quite some historical ballast in this whole APIC driver
probing, which I never came around to clean up.

I'll have a look how this can be done sanely without replicating half of
the existing code just to paper over the real issue.

Thanks,

tglx