提交 b5c2c3d0 编写于 作者: P Paolo Bonzini

memory: MemoryRegion: use /machine as default owner

This will be added (after QOMification) as the QOM parent.
Reviewed-by: NPeter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 563890c7
......@@ -849,7 +849,7 @@ void memory_region_init(MemoryRegion *mr,
{
mr->ops = &unassigned_mem_ops;
mr->opaque = NULL;
mr->owner = owner;
mr->owner = owner ? owner : qdev_get_machine();
mr->iommu_ops = NULL;
mr->container = NULL;
mr->size = int128_make64(size);
......
......@@ -3986,12 +3986,11 @@ int main(int argc, char **argv, char **envp)
exit(1);
}
cpu_exec_init_all();
current_machine = MACHINE(object_new(object_class_get_name(
OBJECT_CLASS(machine_class))));
object_property_add_child(object_get_root(), "machine",
OBJECT(current_machine), &error_abort);
cpu_exec_init_all();
if (machine_class->hw_version) {
qemu_set_version(machine_class->hw_version);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册