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 <odaki@rsg.ci.i.u-tokyo.ac.jp>
---
target/i386/kvm/kvm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c
index 2ce071dfafb2..17f3c3c9e543 100644
--- a/target/i386/kvm/kvm.c
+++ b/target/i386/kvm/kvm.c
@@ -2725,7 +2725,8 @@ static void register_smram_listener(Notifier *n, void *unused)
memory_region_set_enabled(smram, true);
}
- address_space_init(&smram_address_space, NULL, &smram_as_root, "KVM-SMRAM");
+ address_space_init(&smram_address_space, OBJECT(kvm_state), &smram_as_root,
+ "smram-as");
kvm_memory_listener_register(kvm_state, &smram_listener,
&smram_address_space, 1, "kvm-smram");
}
--
2.51.0