aboutsummaryrefslogtreecommitdiff
path: root/softmmu/vl.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2020-10-28 03:52:01 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2020-12-15 12:51:56 -0500
commit0a2949e0be1d7320e4714b26ef60ac4d874dd64f (patch)
treefec5f2f31b2165192480ad7dead84da26d4ebdb8 /softmmu/vl.c
parent0572f558cbc45acdd13ae3548c06ce650641f292 (diff)
downloadqemu-0a2949e0be1d7320e4714b26ef60ac4d874dd64f.zip
qemu-0a2949e0be1d7320e4714b26ef60ac4d874dd64f.tar.gz
qemu-0a2949e0be1d7320e4714b26ef60ac4d874dd64f.tar.bz2
memory: allow creating MemoryRegions before accelerators
Compute the DIRTY_MEMORY_CODE bit in memory_region_get_dirty_log_mask instead of memory_region_init_*. This makes it possible to allocate memory backend objects at any time. Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'softmmu/vl.c')
-rw-r--r--softmmu/vl.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/softmmu/vl.c b/softmmu/vl.c
index 553482e..20db39b 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -1714,11 +1714,7 @@ static bool object_create_early(const char *type, QemuOpts *opts)
return false;
}
- /* Memory allocation by backends needs to be done
- * after configure_accelerator() (due to the tcg_enabled()
- * checks at memory_region_init_*()).
- *
- * Also, allocation of large amounts of memory may delay
+ /* Allocation of large amounts of memory may delay
* chardev initialization for too long, and trigger timeouts
* on software that waits for a monitor socket to be created
* (e.g. libvirt).