Re: [tip: x86/urgent] x86/acpi: Ignore invalid x2APIC entries

From: Zhang, Rui
Date: Thu Dec 14 2023 - 10:01:02 EST


On Wed, 2023-12-13 at 15:51 +0100, Thomas Gleixner wrote:
> On Wed, Dec 13 2023 at 07:39, Zhang, Rui wrote:
> > Yeah, I agree.
> >
> > I have posted a patch to do more strict check
> > https://lore.kernel.org/all/20231210143925.38722-1-rui.zhang@xxxxxxxxx/
> > in case there are some weird cases that LAPIC fails to probe any
> > enabled CPU and we also lose the X2APIC cpus.
>
> The return value of acpi_register_lapic() is not really useful.
>
> It returns an error if
>
>   1) the number of registered CPUs reached the limit.
>   2) the APIC entry is not enabled
>
> #1: any further X2APIC CPU will be ignored
>
> #2: the return value is bogus as the CPU is accounted for as disabled
>     and will eventually lead to #1
>
>     In fact even 'disabled' entries are valid as they can be brought
>     in later (that's what "physical" hotplug uses)

Agreed.

>
> The topology evaluation rework gets rid of this return value
> completely,
> so I really don't want to add an dependency on it.

Great to know that the topology evaluation rework is still in your
plan. We have tested the latest version and it indeed solves some real
issues we observed, and I'm willing to test if we have a new version
posted.

thanks,
rui