Re: [RFC PATCH V2 0/1] x86: cpu topology fix and question on x86_max_cores

From: Peter Zijlstra
Date: Tue Feb 21 2023 - 04:01:24 EST


On Mon, Feb 20, 2023 at 11:49:45PM +0100, Thomas Gleixner wrote:

> > I thought of improving this by parsing all the valid APIC-IDs in MADT
> > during BSP bootup, and get such information by decoding the APIC-IDs
> > using the APIC-ID layout information retrieved from BSP. But this is
> > likely to be a fertile new source of bugs as Dave concerned.
>
> The APIC-IDs are only usefull if there is an architected scheme how they
> are assigned. Is there such a thing?

Isn't that given through CPUID? Or are we worried each CPU will have
different values in the topology leafs?

We really should have added that CPUID uniformity sanity check a long
while ago :-(