From b5c2c3d0c81ea97ac8443113b9a7a0c0ce25368e Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 11 Jun 2014 10:52:32 +0200 Subject: memory: MemoryRegion: use /machine as default owner This will be added (after QOMification) as the QOM parent. Reviewed-by: Peter Crosthwaite Signed-off-by: Paolo Bonzini --- memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'memory.c') diff --git a/memory.c b/memory.c index b91a60a921..7eaa1e9fd4 100644 --- a/memory.c +++ b/memory.c @@ -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); -- cgit v1.2.1