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

[PATCH] libacpi: Remove CPU hotplug and GPE handling from PVH DSDTs


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>
  • Date: Wed, 10 Sep 2025 16:49:19 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=nRHcQao7ZcT1dOkugFqWSPo4ks4CXn7x1yCILxjr+R4=; b=HYTuGEhO51RUOxmfCHHlYBXEvbezKTBn7FvM3U6aZM1ihRve5/3/i4VC0IRJNM/sdJnaunEgPe+Lew/4POoqPd+Y26w7HA5VP0Wp3ZtBE9s/zDhBjpNTaHeI604Udp8dhy+feAtiiOvu/A52bGBgi3N8FBNVEU2kEBH5whDR7Ew1byZoc+mgHvHFi/A18wvo1QcSosqJngx5clC0hk0vdwGklCz+vYbIoV0SyWWzgGerbmg/7YUtkK36sT/1/dvkpLN+y0eG05wbyBJso9ckSvuKyfbjGqnKxBDK787olN/9EMHGobKFGcUpVTCYAgQwyOkMSq6XliiMztELHaqHNQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=elqao55GizjVRhD6LwPwXOYeTnrIId4m11jM+lqnf64IRXB/19ot8mnZ7Mgm6A6Il8eKKEdInJqrCk1AqGI5z8MEVc6HRmk/iKqfP7TO4CZauL95JviXAQU5Su8ETM22KcBmt7m4igqYFSObiD076HyhTKKzpjV5mf6HbtFggQcRQps00zrxeByZ1OADtP1ZpPWHZni2d/SrluvscrQBwJwdI98wbKxhvzJ98R/4SwVcB7GolKn9JQmKbpK0mH5bdFiYqd+vgqKaZ6U34uaIAAF2RX7OjPkOfb0FRxnNJhT2LQYsgS0OI2iADL0bCzzYOAZ+of/wCtggwwiRLFygHA==
  • Cc: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, "Grygorii Strashko" <grygorii_strashko@xxxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Delivery-date: Wed, 10 Sep 2025 14:49:59 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

CPU hotplug relies on the guest having access to the legacy online CPU
bitmap that QEMU provides at PIO 0xAF00. But PVH guests have no DM, so
this causes the MADT to get corrupted due to spurious modifications of
the "online" flag in MADT entries and the table checksum during the
initial acpica passes.

Seeing how ACPI CPU hotplug is the only event delivered via GPE, remove
the GPE handler too.

This shrinks PVH's DSDT substantially and fixes the MADT corruption
problem.

Fixes: e9a8dc050f9a("libacpi: Build DSDT for PVH guests")
Reported-by: Grygorii Strashko <grygorii_strashko@xxxxxxxx>
Signed-off-by: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>
---
 tools/libacpi/mk_dsdt.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/tools/libacpi/mk_dsdt.c b/tools/libacpi/mk_dsdt.c
index 8ac4f9d0b4..f71de6c8c6 100644
--- a/tools/libacpi/mk_dsdt.c
+++ b/tools/libacpi/mk_dsdt.c
@@ -218,6 +218,11 @@ int main(int argc, char **argv)
     pop_block();
     /**** Processor end ****/
 #else
+    if (dm_version == QEMU_NONE) {
+        pop_block();
+        pop_block();
+        return 0;
+    }
 
     /* Operation Region 'PRST': bitmask of online CPUs. */
     stmt("OperationRegion", "PRST, SystemIO, %#x, %d",
@@ -264,10 +269,6 @@ int main(int argc, char **argv)
     pop_block();
     pop_block();
 
-    if (dm_version == QEMU_NONE) {
-        pop_block();
-        return 0;
-    }
     /**** Processor end ****/
 
 

base-commit: 53c599cc33b61ae70d59572f3c1d843a3def84e2
-- 
2.43.0




 


Rackspace

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