Re: recent patch "x86/acpi: Prevent X2APIC id 0xffffffff from being accounted"

From: Dou Liyang
Date: Fri Apr 27 2018 - 04:32:45 EST


Hi Jan,

At 04/27/2018 03:21 PM, Jan Beulich wrote:
Hello,

I've just stumbled across this commit, and I'm wondering if that's actually
correct (I too have at least one system where such IDs are reported in
MADT): For offline/absent CPUs, the firmware may not know the APIC IDs

The MADT table is not reasonable, the Local APIC entries(xAPIC/x2APIC)
in MADT is not always correct as OS want. So, we should do this sanity
check.

at the point MADT is built, so I think it is quite reasonable to put ~0 in
there. The ACPID spec specifically calls out that the IDs must not change
across sleep states, which implies to me that they may change across an
offline period of a CPU. IOW I think such entries still need to contribute to
the count of disabled CPUs.


Aha, there are no CPU devices which will map it's physical ID to the
illegal number 0xffffffff, So it will never be used.

BTW, Limiting the number of the disabled CPUs is also a goal.

Thanks,
dou

I notice a similar change has been done for the xAPIC case a while ago
by you, Thomas.

Jan