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/loongarch/virt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index 0bace2f54b49..f65c2da5c6dd 100644
--- a/hw/loongarch/virt.c
+++ b/hw/loongarch/virt.c
@@ -699,7 +699,8 @@ static void virt_init(MachineState *machine)
     /* Create IOCSR space */
     memory_region_init_io(&lvms->system_iocsr, OBJECT(machine), NULL,
                           machine, "iocsr", UINT64_MAX);
-    address_space_init(&lvms->as_iocsr, NULL, &lvms->system_iocsr, "IOCSR");
+    address_space_init(&lvms->as_iocsr, OBJECT(machine), &lvms->system_iocsr,
+                       "iocsr-as");
     memory_region_init_io(&lvms->iocsr_mem, OBJECT(machine),
                           &virt_iocsr_misc_ops,
                           machine, "iocsr_misc", 0x428);

-- 
2.51.0


Reply via email to