aboutsummaryrefslogtreecommitdiff
path: root/hw/core/numa.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/core/numa.c')
-rw-r--r--hw/core/numa.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/hw/core/numa.c b/hw/core/numa.c
index 840e68581f..8264336209 100644
--- a/hw/core/numa.c
+++ b/hw/core/numa.c
@@ -817,20 +817,8 @@ void memory_region_allocate_system_memory(MemoryRegion *mr, Object *owner,
if (!backend) {
continue;
}
- MemoryRegion *seg = host_memory_backend_get_memory(backend);
-
- if (memory_region_is_mapped(seg)) {
- char *path = object_get_canonical_path_component(OBJECT(backend));
- error_report("memory backend %s is used multiple times. Each "
- "-numa option must use a different memdev value.",
- path);
- g_free(path);
- exit(1);
- }
-
- host_memory_backend_set_mapped(backend, true);
+ MemoryRegion *seg = machine_consume_memdev(ms, backend);
memory_region_add_subregion(mr, addr, seg);
- vmstate_register_ram_global(seg);
addr += size;
}
}