[PATCH] vl: Fixup mismatching ram size

lichun posted 1 patch 2 years, 2 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/tencent_126A74BD1A371588D4A638DE700FA8844406@qq.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>
softmmu/vl.c | 2 ++
1 file changed, 2 insertions(+)
[PATCH] vl: Fixup mismatching ram size
Posted by lichun 2 years, 2 months ago
There is a mismatch between 'memory-backend' and '-m 0'(implicitly).

Signed-off-by: lichun <706701795@qq.com>
---
 softmmu/vl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/softmmu/vl.c b/softmmu/vl.c
index 1fe028800f..70eb2e53e9 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -2110,6 +2110,8 @@ static void set_memory_options(MachineClass *mc)
         exit(EXIT_FAILURE);
     }
 
+    /* store value for have_custom_ram_size() */
+    qemu_opt_set_number(opts, "size", ram_size, &error_abort);
     maxram_size = ram_size;
 
     if (qemu_opt_get(opts, "maxmem")) {
-- 
2.35.1