|
Paolo Bonzini |
d9c8b5 |
From 7de096767b5e65d105168fbd5130397f9fbda626 Mon Sep 17 00:00:00 2001
|
|
Paolo Bonzini |
d9c8b5 |
From: Paolo Bonzini <pbonzini@redhat.com>
|
|
Paolo Bonzini |
d9c8b5 |
Date: Tue, 18 May 2021 12:35:31 +0200
|
|
Paolo Bonzini |
d9c8b5 |
Subject: [PATCH 1/5] vl: allow not specifying size in -m when using -M
|
|
Paolo Bonzini |
d9c8b5 |
memory-backend
|
|
Paolo Bonzini |
d9c8b5 |
|
|
Paolo Bonzini |
d9c8b5 |
Starting in QEMU 6.0's commit f5c9fcb82d ("vl: separate
|
|
Paolo Bonzini |
d9c8b5 |
qemu_create_machine", 2020-12-10), a function have_custom_ram_size()
|
|
Paolo Bonzini |
d9c8b5 |
replaced the return value of set_memory_options().
|
|
Paolo Bonzini |
d9c8b5 |
|
|
Paolo Bonzini |
d9c8b5 |
The purpose of the return value was to record the presence of
|
|
Paolo Bonzini |
d9c8b5 |
"-m size", and if it was not there, change the default RAM
|
|
Paolo Bonzini |
d9c8b5 |
size to the size of the memory backend passed with "-M
|
|
Paolo Bonzini |
d9c8b5 |
memory-backend".
|
|
Paolo Bonzini |
d9c8b5 |
|
|
Paolo Bonzini |
d9c8b5 |
With that commit, however, have_custom_ram_size() is now queried only
|
|
Paolo Bonzini |
d9c8b5 |
after set_memory_options has stored the fixed-up RAM size in QemuOpts for
|
|
Paolo Bonzini |
d9c8b5 |
"future use". This was actually the only future use of the fixed-up RAM
|
|
Paolo Bonzini |
d9c8b5 |
size, so remove that code and fix the bug.
|
|
Paolo Bonzini |
d9c8b5 |
|
|
Paolo Bonzini |
d9c8b5 |
Cc: qemu-stable@nongnu.org
|
|
Paolo Bonzini |
d9c8b5 |
Fixes: f5c9fcb82d ("vl: separate qemu_create_machine", 2020-12-10)
|
|
Paolo Bonzini |
d9c8b5 |
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Paolo Bonzini |
d9c8b5 |
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
|
|
Paolo Bonzini |
d9c8b5 |
Message-Id: <20210518103531.104162-1-pbonzini@redhat.com>
|
|
Paolo Bonzini |
d9c8b5 |
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Paolo Bonzini |
d9c8b5 |
---
|
|
Paolo Bonzini |
d9c8b5 |
softmmu/vl.c | 2 --
|
|
Paolo Bonzini |
d9c8b5 |
1 file changed, 2 deletions(-)
|
|
Paolo Bonzini |
d9c8b5 |
|
|
Paolo Bonzini |
d9c8b5 |
diff --git a/softmmu/vl.c b/softmmu/vl.c
|
|
Paolo Bonzini |
d9c8b5 |
index aadb526..29d6415 100644
|
|
Paolo Bonzini |
d9c8b5 |
--- a/softmmu/vl.c
|
|
Paolo Bonzini |
d9c8b5 |
+++ b/softmmu/vl.c
|
|
Paolo Bonzini |
d9c8b5 |
@@ -2025,8 +2025,6 @@ static void set_memory_options(MachineClass *mc)
|
|
Paolo Bonzini |
d9c8b5 |
exit(EXIT_FAILURE);
|
|
Paolo Bonzini |
d9c8b5 |
}
|
|
Paolo Bonzini |
d9c8b5 |
|
|
Paolo Bonzini |
d9c8b5 |
- /* store value for the future use */
|
|
Paolo Bonzini |
d9c8b5 |
- qemu_opt_set_number(opts, "size", ram_size, &error_abort);
|
|
Paolo Bonzini |
d9c8b5 |
maxram_size = ram_size;
|
|
Paolo Bonzini |
d9c8b5 |
|
|
Paolo Bonzini |
d9c8b5 |
if (qemu_opt_get(opts, "maxmem")) {
|
|
Paolo Bonzini |
d9c8b5 |
--
|
|
Paolo Bonzini |
d9c8b5 |
2.31.1
|
|
Paolo Bonzini |
d9c8b5 |
|