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/nubus/nubus-bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/nubus/nubus-bus.c b/hw/nubus/nubus-bus.c index 1d553be77662..75767c9fc399 100644 --- a/hw/nubus/nubus-bus.c +++ b/hw/nubus/nubus-bus.c @@ -82,7 +82,7 @@ static void nubus_unrealize(BusState *bus) { NubusBus *nubus = NUBUS_BUS(bus); - address_space_destroy(&nubus->nubus_as); + object_unparent(OBJECT(&nubus->nubus_as)); } static void nubus_realize(BusState *bus, Error **errp) @@ -94,7 +94,7 @@ static void nubus_realize(BusState *bus, Error **errp) return; } - address_space_init(&nubus->nubus_as, NULL, &nubus->nubus_mr, "nubus"); + address_space_init(&nubus->nubus_as, OBJECT(nubus), &nubus->nubus_mr, "as"); } static void nubus_init(Object *obj) -- 2.51.0