Commit b6999e2fbd for qemu.org
commit b6999e2fbded844431758bbfbabe41d2555d9e1a
Author: Sairaj Kodilkar <sarunkod@amd.com>
Date: Wed Oct 14 11:04:31 2026 +0530
amd_iommu: Introduce root bus
Following patch will create IVRS entries starting from the root bus
Signed-off-by: Sairaj Kodilkar <sarunkod@amd.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-ID: <20261014053433.24564-7-sarunkod@amd.com>
diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c
index b2df0e9533..14ea8274b2 100644
--- a/hw/i386/amd_iommu.c
+++ b/hw/i386/amd_iommu.c
@@ -2713,6 +2713,8 @@ static void amdvi_sysbus_realize(DeviceState *dev, Error **errp)
}
}
+ s->root_bus = bus;
+
s->iotlb = g_hash_table_new_full(amdvi_iotlb_hash,
amdvi_iotlb_equal, g_free, g_free);
diff --git a/hw/i386/amd_iommu.h b/hw/i386/amd_iommu.h
index c5b346cc35..948d8611b1 100644
--- a/hw/i386/amd_iommu.h
+++ b/hw/i386/amd_iommu.h
@@ -388,6 +388,9 @@ struct AMDVIState {
/* DMA address translation */
bool dma_remap;
+
+ /* root bus to register IOMMU ops */
+ PCIBus *root_bus;
};
uint64_t amdvi_extended_feature_register(AMDVIState *s);