[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <104d086f51d8e297e26fa52a1ebd091041ec2312.camel@intel.com>
Date: Wed, 11 Dec 2024 05:40:04 +0000
From: "Zhang, Rui" <rui.zhang@...el.com>
To: "tglx@...utronix.de" <tglx@...utronix.de>, "x86@...nel.org"
<x86@...nel.org>, "mingo@...hat.com" <mingo@...hat.com>, "rafael@...nel.org"
<rafael@...nel.org>, "lenb@...nel.org" <lenb@...nel.org>, "bp@...en8.de"
<bp@...en8.de>, "dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>
CC: "jmattson@...gle.com" <jmattson@...gle.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>
Subject: Re: [PATCH] x86/acpi: Fix LAPIC/x2APIC parsing order
On Tue, 2024-12-10 at 23:51 +0100, Thomas Gleixner wrote:
> On Tue, Oct 22 2024 at 08:17, Zhang Rui wrote:
> > On some systems, the same CPU (with the same APIC ID) is assigned a
> > different logical CPU id after commit ec9aedb2aa1a ("x86/acpi:
> > Ignore
> > invalid x2APIC entries").
> >
> > This means that Linux enumerates the CPUs in a different order,
> > which
> > violates ACPI specification[1] that states:
> >
> > "OSPM should initialize processors in the order that they appear
> > in
> > the MADT"
> >
> > The problematic commit parses all LAPIC entries before any x2APIC
> > entries, aiming to ignore x2APIC entries with APIC ID < 255 when
> > valid
> > LAPIC entries exist. However, it disrupts the CPU enumeration order
> > on
> > systems where x2APIC entries precede LAPIC entries in the MADT.
> >
> > Fix the problem by separately checking LAPIC entries before parsing
> > any
> > LAPIC or x2APIC entries.
>
> I really had to stare at the change to understand how this fixes
> anything. What you want to say is:
>
> Fix this problem by:
>
> 1) Parsing LAPIC entries first without registering them in the
> topology to evaluate whether valid LAPIC entries exist.
>
> 2) Restoring the MADT in order parser which invokes either the
> LAPIC or
> the X2APIC parser function depending on the entry type.
>
> The X2APIC parser still ignores entries < 0xff in case that #1
> found valid LAPIC entries independent of their position in the
> MADT table.
>
Exactly. Thanks for the rewording.
-rui
> Other than that:
>
> Reviewed-by: Thomas Gleixner <tglx@...utronix.de>
>
>
Powered by blists - more mailing lists