From d2a88aca766697e8490504313d23002c3315ee93 Mon Sep 17 00:00:00 2001 From: Sunil V L Date: Sat, 22 Mar 2025 10:01:37 +0530 Subject: hw/riscv/virt: Add the BDF of IOMMU to RISCVVirtState structure When the IOMMU is implemented as a PCI device, its BDF is created locally in virt.c. However, the same BDF is also required in virt-acpi-build.c to support ACPI. Therefore, make this information part of the global RISCVVirtState structure so that it can be accessed outside of virt.c as well. Signed-off-by: Sunil V L Reviewed-by: Daniel Henrique Barboza Message-ID: <20250322043139.2003479-2-sunilvl@ventanamicro.com> Signed-off-by: Alistair Francis --- hw/riscv/virt.c | 1 + 1 file changed, 1 insertion(+) (limited to 'hw/riscv/virt.c') diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index be1bf0f646..5958ad1f7d 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -1117,6 +1117,7 @@ static void create_fdt_iommu(RISCVVirtState *s, uint16_t bdf) qemu_fdt_setprop_cells(fdt, pci_node, "iommu-map", 0, iommu_phandle, 0, bdf, bdf + 1, iommu_phandle, bdf + 1, 0xffff - bdf); + s->pci_iommu_bdf = bdf; } static void finalize_fdt(RISCVVirtState *s) -- cgit 1.4.1