[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] xen/amd/iommu: Skip IO-APICs missing from the IVRS in shared IRT mode
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Stefano Stabellini <stefano.stabellini@xxxxxxx>
- Date: Tue, 20 Oct 2026 14:59:41 -0700
- 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=9FhfR7bu914GJu8wPNMWnXkcHIbDHzzuoXzcUtJH2wY=; b=e4v2emswJeFI+zt5693HdRiqQhYqPmvWYX3hgyZHBO6errtvPkKSx8CXULOv2uKuGSmVoVggrqgaX99G1VYmlZepKsLpY1++OqLZ7/gWYiRcH9KhFM2icd2i38nyK66q4ddx7AjHKwrTvjwh3OsZ0qJ4rqJ45HUG5COPmHeKkSCQr9XbxXYRpAL+5GtkhqGfzPlRttFzy0nEDsKtPBR/jaTR3tNQT5vOw78novCvfVOLMV07thK6Eq1m8NIT1nETH9BMm/o49VYXmBqA5F0Kf9/WCcAEHo5a1a+E54GORuoR1tGiZPi0fa1Xv94H+GAMiD/yTq8+XKjGzP2pOdZEuw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=JOHTJZWoOFleh3mynl1hCguxR08Qujw+7U7MQfgxudtiaL7Kg1bOXwZjox0fuV2TUGAUuk/h7tMcPoQkC+EW8dCrbIIuc/1rGP19X5ZyPD9tmpPpfTjzoDQL7ZtDhxr+ottwepOLlPCSOOX3zAeTF+ELI7ur7EC0NcJD9QiqE/4A/pIWCy/sn3LfznelgXvWzlW3NYOD266u17f0Nsmaelt/rHGRQR4rnntA13PPoRnND/SL4LwIeR9f2tXLdB/jUe7tad6Z04o166MZ6IexsdJCn+3yQI4FcSoTEWwkhlJ24fW5r4VzvqSDjm0M2GIaqLKoWrE7W7GIwIHiDF4WGg==
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
- Cc: <jbeulich@xxxxxxxx>, <andrew.cooper3@xxxxxxxxxx>, <roger@xxxxxxxxxxxxxx>, <jason.andryuk@xxxxxxx>, <teddy.astie@xxxxxxxxxx>, <stefano.stabellini@xxxxxxx>
- Delivery-date: Tue, 20 Oct 2026 22:00:02 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
When an IO-APIC with entries isn't described by the IVRS,
ioapic_id_to_index() returns MAX_IO_APICS. With per-device interrupt
remapping tables this is fatal, but in shared mode parse_ivrs_table()
only logs it and then uses MAX_IO_APICS as an index, reading and writing
one past the end of ioapic_sbdf[].
Skip such an IO-APIC instead. It is left without interrupt remapping,
which is what the rest of the code already assumes for an IO-APIC with
no index.
Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx>
---
xen/drivers/passthrough/amd/iommu_acpi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/xen/drivers/passthrough/amd/iommu_acpi.c
b/xen/drivers/passthrough/amd/iommu_acpi.c
index 39ae637959..4688908824 100644
--- a/xen/drivers/passthrough/amd/iommu_acpi.c
+++ b/xen/drivers/passthrough/amd/iommu_acpi.c
@@ -1132,6 +1132,7 @@ static int __init cf_check parse_ivrs_table(struct
acpi_table_header *table)
IO_APIC_ID(apic));
if ( amd_iommu_perdev_intremap )
return -ENXIO;
+ continue;
}
/* SB IO-APIC is always on this device in AMD systems. */
--
2.43.0
|