aboutsummaryrefslogtreecommitdiff
path: root/memory.c
diff options
context:
space:
mode:
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);