qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC v1 10/25] exec: Parent root MRs to the machine


From: Peter Crosthwaite
Subject: [Qemu-devel] [RFC v1 10/25] exec: Parent root MRs to the machine
Date: Thu, 15 May 2014 18:55:40 -0700

Parent the root MemoryRegions for Memory and IO to the machine. This
gives them a QOM path.

Signed-off-by: Peter Crosthwaite <address@hidden>
---

 exec.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/exec.c b/exec.c
index cf12049..7ffca81 100644
--- a/exec.c
+++ b/exec.c
@@ -1886,11 +1886,15 @@ static void memory_map_init(void)
     system_memory = g_malloc(sizeof(*system_memory));
 
     memory_region_init(system_memory, NULL, "system", UINT64_MAX);
+    object_property_add_child(qdev_get_machine(), "sysmem",
+                              OBJECT(system_memory), &error_abort);
     address_space_init(&address_space_memory, system_memory, "memory");
 
     system_io = g_malloc(sizeof(*system_io));
     memory_region_init_io(system_io, NULL, &unassigned_io_ops, NULL, "io",
                           65536);
+    object_property_add_child(qdev_get_machine(), "sysio",
+                              OBJECT(system_io), &error_abort);
     address_space_init(&address_space_io, system_io, "I/O");
 
     memory_listener_register(&core_memory_listener, &address_space_memory);
-- 
1.9.3.1.ga73a6ad




reply via email to

[Prev in Thread] Current Thread [Next in Thread]