[PATCH v1] iommu/amd: Recognize Hygon southbridge IOAPIC for interrupt remapping
From: Wei Wang
Date: Wed Mar 25 2026 - 05:39:53 EST
Hygon systems use the AMD IOMMU driver but newer Hygon platforms report
the southbridge IOAPIC at a different PCI device (00:0b.0), whereas AMD
systems use device 00:14.0.
check_ioapic_information() validates that the SB IOAPIC is present in
the IVRS table by comparing each reported IOAPIC devid against a single
hardcoded constant IOAPIC_SB_DEVID. On newer Hygon systems, this
comparison always fails, causing the function to report "BIOS bug: No
southbridge IOAPIC found" and return false, which causes the caller to
disable interrupt remapping entirely.
Fix this by splitting IOAPIC_SB_DEVID into two vendor-specific constants
and accepting either in the check. Older Hygon systems still use the
original AMD device ID (00:14.0) while newer systems use 00:0b.0, so a
strict CPU vendor check is insufficient. Since the devid values are
mutually exclusive and are read directly from the firmware IVRS table, the
OR condition safely handles both hardware generations and is a no-op on
platforms where the other value does not appear.
Signed-off-by: Wei Wang <wei.w.wang@xxxxxxxxxxx>
Tested-by: Yongwei Xu <xuyongwei@xxxxxxxxxxxxxx>
---
drivers/iommu/amd/init.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c
index 56ad020df494..1f545fe2f1e7 100644
--- a/drivers/iommu/amd/init.c
+++ b/drivers/iommu/amd/init.c
@@ -3096,8 +3096,9 @@ static void __init free_iommu_resources(void)
free_pci_segments();
}
-/* SB IOAPIC is always on this device in AMD systems */
-#define IOAPIC_SB_DEVID ((0x00 << 8) | PCI_DEVFN(0x14, 0))
+/* SB IOAPIC device IDs */
+#define IOAPIC_SB_DEVID_AMD ((0x00 << 8) | PCI_DEVFN(0x14, 0))
+#define IOAPIC_SB_DEVID_HYGON ((0x00 << 8) | PCI_DEVFN(0x0b, 0))
static bool __init check_ioapic_information(void)
{
@@ -3124,7 +3125,8 @@ static bool __init check_ioapic_information(void)
pr_err("%s: IOAPIC[%d] not in IVRS table\n",
fw_bug, id);
ret = false;
- } else if (devid == IOAPIC_SB_DEVID) {
+ } else if (devid == IOAPIC_SB_DEVID_AMD ||
+ devid == IOAPIC_SB_DEVID_HYGON) {
has_sb_ioapic = true;
ret = true;
}
base-commit: 85964cdcad0fac9a0eb7b87a0f9d88cc074b854c
--
2.51.0