From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Simon Gaiser <simon@invisiblethingslab.com>,
xen-devel@lists.xenproject.org
Cc: "Jan Beulich" <jbeulich@suse.com>,
"Roger Pau Monné" <roger.pau@citrix.com>, "Wei Liu" <wl@xen.org>,
"Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
Subject: Re: [XEN PATCH] x86/ACPI: Ignore entries with invalid APIC IDs when parsing MADT
Date: Mon, 7 Aug 2023 11:01:22 +0100 [thread overview]
Message-ID: <d5a99971-059b-022f-1b17-ca22431fad4f@citrix.com> (raw)
In-Reply-To: <7f158a54548456daba9f2e105d099d2e5e2c2f38.1691399031.git.simon@invisiblethingslab.com>
On 07/08/2023 10:38 am, Simon Gaiser wrote:
> It seems some firmwares put dummy entries in the ACPI MADT table for non
> existing processors. On my NUC11TNHi5 those have the invalid APIC ID
> 0xff. Linux already has code to handle those cases both in
> acpi_parse_lapic [1] as well as in acpi_parse_x2apic [2]. So add the
> same check to Xen.
>
> Note that on some older (2nd gen Core i) laptop of mine I also saw dummy
> entries with a valid APIC ID. Linux would still ignore those because
> they have !ACPI_MADT_ENABLED && !ACPI_MADT_ONLINE_CAPABLE. But in Xen
> this check is only active for madt_revision >= 5. But since this version
> check seems to be intentionally I leave that alone.
I recall there being a discussion over this, ultimately with the version
check being removed. IIRC it was a defacto standard used for a long
time prior to actually getting written into the ACPI spec, so does exist
in practice in older MADTs.
Otherwise LGTM. I'd suggest dropping this paragraph as it's not related
to the change. It will also help if we do decide to follow up and drop
the MADT version check.
>
> Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f3bf1dbe64b62a2058dd1944c00990df203e8e7a # [1]
> Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=10daf10ab154e31237a8c07242be3063fb6a9bf4 # [2]
https://git.kernel.org/torvalds/c/$SHA
Somewhat less verbose. https://korg.docs.kernel.org/git-url-shorteners.html
> Signed-off-by: Simon Gaiser <simon@invisiblethingslab.com>
> ---
> xen/arch/x86/acpi/boot.c | 14 ++++++++++----
> 1 file changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/xen/arch/x86/acpi/boot.c b/xen/arch/x86/acpi/boot.c
> index 54b72d716b..4a62822fa9 100644
> --- a/xen/arch/x86/acpi/boot.c
> +++ b/xen/arch/x86/acpi/boot.c
> @@ -87,14 +87,17 @@ acpi_parse_x2apic(struct acpi_subtable_header *header, const unsigned long end)
> if (BAD_MADT_ENTRY(processor, end))
> return -EINVAL;
>
> + /* Ignore entries with invalid apicid */
x2apic ID.
~Andrew
next prev parent reply other threads:[~2023-08-07 10:01 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-07 9:38 [XEN PATCH] x86/ACPI: Ignore entries with invalid APIC IDs when parsing MADT Simon Gaiser
2023-08-07 10:01 ` Andrew Cooper [this message]
2023-08-07 10:06 ` Andrew Cooper
2023-08-07 10:17 ` Simon Gaiser
2023-08-07 14:45 ` Simon Gaiser
2023-08-23 9:32 ` Andrew Cooper
2023-09-11 10:17 ` Simon Gaiser
2023-08-07 10:13 ` Jan Beulich
2023-08-07 12:55 ` Simon Gaiser
2023-08-07 13:17 ` Jan Beulich
2023-08-07 14:04 ` Andrew Cooper
2023-08-07 14:18 ` Jan Beulich
2023-08-23 9:21 ` Andrew Cooper
2023-08-23 12:56 ` Jan Beulich
2023-08-27 15:44 ` Thomas Gleixner
2023-08-29 14:25 ` Roger Pau Monné
2023-08-29 22:54 ` Thomas Gleixner
2023-08-30 7:20 ` Jan Beulich
2023-08-30 15:44 ` Thomas Gleixner
2023-08-07 15:05 ` Simon Gaiser
2023-08-23 9:13 ` Roger Pau Monné
2023-09-01 7:44 ` Jan Beulich
2023-09-06 20:49 ` Stefano Stabellini
2023-09-07 6:50 ` Jan Beulich
2023-09-07 21:30 ` Stefano Stabellini
2023-09-11 18:24 ` Andrew Cooper
2023-09-11 22:38 ` Stefano Stabellini
2023-09-12 9:38 ` Roger Pau Monné
2023-09-12 7:56 ` Thomas Gleixner
2023-09-13 10:02 ` George Dunlap
2023-09-13 23:18 ` Stefano Stabellini
2023-09-15 10:41 ` George Dunlap
2023-09-12 8:33 ` Jan Beulich
2023-09-12 8:36 ` Jan Beulich
2023-09-11 18:05 ` Simon Gaiser
2023-09-12 8:41 ` Jan Beulich
2023-09-12 8:45 ` Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d5a99971-059b-022f-1b17-ca22431fad4f@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=marmarek@invisiblethingslab.com \
--cc=roger.pau@citrix.com \
--cc=simon@invisiblethingslab.com \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.