From: Akihiko Odaki <[email protected]> as points to the MemoryRegion itself. s is the device that owns the MemoryRegion.
Signed-off-by: Akihiko Odaki <[email protected]> Reviewed-by: Daniel Henrique Barboza <[email protected]> Reviewed-by: Nutty Liu <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Message-ID: <[email protected]> Signed-off-by: Alistair Francis <[email protected]> (cherry picked from commit c497ef6739cfb44b4fdb410ad997e3d2ea506788) Signed-off-by: Michael Tokarev <[email protected]> diff --git a/hw/riscv/riscv-iommu.c b/hw/riscv/riscv-iommu.c index 4ba4164df41..5a7f3c783dc 100644 --- a/hw/riscv/riscv-iommu.c +++ b/hw/riscv/riscv-iommu.c @@ -1495,7 +1495,7 @@ static AddressSpace *riscv_iommu_space(RISCVIOMMUState *s, PCIBus *bus, /* IOVA address space, untranslated addresses */ memory_region_init_iommu(&as->iova_mr, sizeof(as->iova_mr), TYPE_RISCV_IOMMU_MEMORY_REGION, - OBJECT(as), "riscv_iommu", UINT64_MAX); + OBJECT(s), "riscv_iommu", UINT64_MAX); address_space_init(&as->iova_as, MEMORY_REGION(&as->iova_mr), name); QLIST_INSERT_HEAD(&s->spaces, as, list); -- 2.47.3
