Make AddressSpaces QOM objects to ensure that they are destroyed when
their owners are finalized and also to get a unique path for debugging
output.

The name arguments were used to distinguish AddresSpaces in debugging
output, but they will represent property names after QOM-ification and
debugging output will show QOM paths. So change them to make them more
concise and also avoid conflicts with other properties.

Signed-off-by: Akihiko Odaki <od...@rsg.ci.i.u-tokyo.ac.jp>
---
 hw/intc/arm_gicv3_common.c | 3 +--
 hw/intc/pnv_xive.c         | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/hw/intc/arm_gicv3_common.c b/hw/intc/arm_gicv3_common.c
index 169e0fcca828..a56b2eb7b3bc 100644
--- a/hw/intc/arm_gicv3_common.c
+++ b/hw/intc/arm_gicv3_common.c
@@ -429,8 +429,7 @@ static void arm_gicv3_common_realize(DeviceState *dev, 
Error **errp)
     }
 
     if (s->lpi_enable) {
-        address_space_init(&s->dma_as, NULL, s->dma,
-                           "gicv3-its-sysmem");
+        address_space_init(&s->dma_as, OBJECT(s), s->dma, "as");
     }
 
     s->cpu = g_new0(GICv3CPUState, s->num_cpu);
diff --git a/hw/intc/pnv_xive.c b/hw/intc/pnv_xive.c
index d14c26773021..baa90956e796 100644
--- a/hw/intc/pnv_xive.c
+++ b/hw/intc/pnv_xive.c
@@ -2012,10 +2012,10 @@ static void pnv_xive_realize(DeviceState *dev, Error 
**errp)
 
     memory_region_init(&xive->ipi_mmio, OBJECT(xive), "xive-vc-ipi",
                        PNV9_XIVE_VC_SIZE);
-    address_space_init(&xive->ipi_as, NULL, &xive->ipi_mmio, "xive-vc-ipi");
+    address_space_init(&xive->ipi_as, OBJECT(xive), &xive->ipi_mmio, "ipi-as");
     memory_region_init(&xive->end_mmio, OBJECT(xive), "xive-vc-end",
                        PNV9_XIVE_VC_SIZE);
-    address_space_init(&xive->end_as, NULL, &xive->end_mmio, "xive-vc-end");
+    address_space_init(&xive->end_as, OBJECT(xive), &xive->end_mmio, "end-as");
 
     /*
      * The MMIO windows exposing the IPI ESBs and the END ESBs in the

-- 
2.51.0


Reply via email to