hw/riscv/riscv-iommu: Fix MemoryRegion owner
PATCH 1/1 hw/riscv/riscv-iommu: Fix MemoryRegion owner
as points to the MemoryRegion itself. s is the device that owns the MemoryRegion.
--- hw/riscv/riscv-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/riscv/riscv-iommu.c +1 -1
@@ -1362,7 +1362,7 @@ static AddressSpace *riscv_iommu_space(RISCVIOMMUState *s, uint32_t devid)/* 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);
---
base-commit: 36076d24f04ea9dc3357c0fbe7bb14917375819c
change-id: 20251027-iommu-94d68e7a85d2
Best regards,
Signature · 1 line
Akihiko Odaki <[email protected]>
Quoted 7 lines · Akihiko Odaki
as points to the MemoryRegion itself. s is the device that owns the MemoryRegion.
Signed-off-by Akihiko Odaki <[email protected]>--- hw/riscv/riscv-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 5 lines · Akihiko Odaki
as points to the MemoryRegion itself. s is the device that owns the MemoryRegion.
Signed-off-by Akihiko Odaki <[email protected]>---
Quoted 25 lines
hw/riscv/riscv-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/riscv/riscv-iommu.c +1
-2@@ -1362,7 +1362,7 @@ static AddressSpace *riscv_iommu_space(RISCVIOMMUState *s, uint32_t devid)/* 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); ---base-commit:
36076d24f04ea9dc3357c0fbe7bb14917375819c
change-id: 20251027-iommu-94d68e7a85d2Best regards,
--
Akihiko Odaki <[email protected]>
Quoted 7 lines · Akihiko Odaki
as points to the MemoryRegion itself. s is the device that owns the MemoryRegion.
Signed-off-by Akihiko Odaki <[email protected]>--- hw/riscv/riscv-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks,
Nutty
Alistair Francis
AppliedQuoted 5 lines · Akihiko Odaki
as points to the MemoryRegion itself. s is the device that owns the MemoryRegion.
Signed-off-by Akihiko Odaki <[email protected]>
Thanks!
Applied to riscv-to-apply.next
Alistair
Quoted 27 lines
--- hw/riscv/riscv-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/riscv/riscv-iommu.c +1
-2@@ -1362,7 +1362,7 @@ static AddressSpace *riscv_iommu_space(RISCVIOMMUState *s, uint32_t devid)/* 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); ---base-commit:
36076d24f04ea9dc3357c0fbe7bb14917375819c
change-id: 20251027-iommu-94d68e7a85d2Best regards,
--
Akihiko Odaki <[email protected]>