aboutsummaryrefslogtreecommitdiff
path: root/memory.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2014-06-11 10:52:32 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2014-07-01 10:20:41 +0200
commitb5c2c3d0c81ea97ac8443113b9a7a0c0ce25368e (patch)
treed3e2e0e70d70c37083ff8167dd7d9474ebfbca5e /memory.c
parent563890c7c7e977842e2a35afe7a24d06d2103242 (diff)
memory: MemoryRegion: use /machine as default owner
This will be added (after QOMification) as the QOM parent. Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'memory.c')
-rw-r--r--memory.c2
1 files changed, 1 insertions, 1 deletions
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);