[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH] x86/ACPI: Ignore entries with invalid APIC IDs when parsing MADT


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 7 Aug 2023 16:18:26 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=nKHsxWsoK0lnmkfytgfpihvQurqU3dukBFi9QGrwNqo=; b=gAE+07Dy2yY2IUOk8m4b0bsVawtQbmWjLRvE0SqH4V5/cWZZB2+q3Ss36CQG7HyDnk7A7VA4tlZWw6Xm0GhtqO0Hj4330LMeiRlOS9d7RfMtVicEvxgGdkorUcL3di2VjWFqZ20IrxDe45tZFgJ3H9T6d5nRMJmcWADqHrxwyS+Ftgh5EZEQe2Sy2FNyChT//p2il/pGAHjHoCzXr2iSEANrEUMKiKPrb3UTUhkF++AdFvX+2SIQEidq2EFBpIBAn8ROGuvLn3W4avt+h7KTqoKyNwuSApZKK0atJMFxHwKOdE14UlZRBQkZbYKDmPSwUYQFypgr2Eew2DrsFoz/mg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FO0HTaoeFKsJdqLV5yDVJWhE6VCawUUyfUvhDDxsxIUsOhn8SkpFINV+OIa9OC1ZBu5Ib2W/2VVbomBic73idrQ805gv4RANYcPgglQou0hUsVkj3zKzSJBYeZX2UyXwbUpYkR92Sc3CDcldul4lKgmD/FNdwkwanPY5xBzk2djFWJSOAlRDEBu7CDo+JedygGlupIyojYy409Xbha4t8aHH0rZR00ZXHuIH9yEkA/iemYsvSoBwgFu2AfVooD8Qz9pR017Ym3vERm3sqyg7ZkYlRsEdskfF0nqXTJZKh1kcain68y+WekgXVz/23RrfO5m7/5Qtv+3d4puCjKdQ1Q==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Simon Gaiser <simon@xxxxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 07 Aug 2023 14:18:35 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 07.08.2023 16:04, Andrew Cooper wrote:
> On 07/08/2023 2:17 pm, Jan Beulich wrote:
>> On 07.08.2023 14:55, Simon Gaiser wrote:
>>> Jan Beulich:
>>>> On 07.08.2023 11:38, 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.
>>>> I'm afraid it doesn't become clear to me what problem you're trying to
>>>> solve.
>>> I want Xen to not think there are possible CPUs that actually never can
>>> be there.
>> Did you try using "maxcpus=" on the command line? If that doesn't work
>> well enough (perhaps because of causing undesirable log messages), maybe
>> we need some way to say "no CPU hotplug" on the command line.
> 
> The ACPI tables are broken, and Xen's parsing of them is wrong.
> 
> And irrespective - it's unreasonable to have users work around bugs in
> Xen by adding more command line.

Well, considering how rare CPU hotplug appears to be, such a new option
could default to "no hotplug".

>>> Without ignoring those dummy entries Xen thinks my NUC has 2 sockets and
>>> that there are 8 logical CPUs that are currently disabled but could be
>>> hotplugged.
>> Yet it's exactly this which ACPI is telling us here (with some vagueness,
>> which isn't easy to get around; see below).
>>
>>> I'm moderately sure that soldering in another CPU is not supported, even
>>> less so at runtime ;]
>> On your system. What about others, which are hotplug-capable?
> 
> It is required that all APIC ID are stated *ahead of time*.

Would you mind pointing me at where this is stated? Aiui MADT entries
can be modified dynamically (we do so ourselves in the DSDT we supply
HVM guests with), and as I further understand this may be required
also for the APIC ID fields because firmware may not know how APIC IDs
are to be arranged for a new socket before being populated (by perhaps
a not entirely identical CPU, and this may not even need to be mixed
steppings).

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.