[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 23/28] vl: allow not specifying size in -m when using -M memory-ba
From: |
Paolo Bonzini |
Subject: |
[PULL 23/28] vl: allow not specifying size in -m when using -M memory-backend |
Date: |
Mon, 24 May 2021 18:41:26 +0200 |
Starting in QEMU 6.0's commit f5c9fcb82d ("vl: separate
qemu_create_machine", 2020-12-10), a function have_custom_ram_size()
replaced the return value of set_memory_options().
The purpose of the return value was to record the presence of
"-m size", and if it was not there, change the default RAM
size to the size of the memory backend passed with "-M
memory-backend".
With that commit, however, have_custom_ram_size() is now queried only
after set_memory_options has stored the fixed-up RAM size in QemuOpts for
"future use". This was actually the only future use of the fixed-up RAM
size, so remove that code and fix the bug.
Cc: qemu-stable@nongnu.org
Fixes: f5c9fcb82d ("vl: separate qemu_create_machine", 2020-12-10)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
softmmu/vl.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/softmmu/vl.c b/softmmu/vl.c
index ac0ff6e160..21e55718a6 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -2039,8 +2039,6 @@ static void set_memory_options(MachineClass *mc)
exit(EXIT_FAILURE);
}
- /* store value for the future use */
- qemu_opt_set_number(opts, "size", ram_size, &error_abort);
maxram_size = ram_size;
if (qemu_opt_get(opts, "maxmem")) {
--
2.31.1
- [PULL 07/28] qtest: add a QOM object for qtest, (continued)
- [PULL 07/28] qtest: add a QOM object for qtest, Paolo Bonzini, 2021/05/24
- [PULL 27/28] hw/scsi: Fix sector translation bug in scsi_unmap_complete_noio, Paolo Bonzini, 2021/05/24
- [PULL 26/28] configure: Avoid error messages about missing *-config-*.h files, Paolo Bonzini, 2021/05/24
- [PULL 28/28] gitlab-ci: use --meson=git for CFI jobs, Paolo Bonzini, 2021/05/24
- [PULL 17/28] KVM: Disable manual dirty log when dirty ring enabled, Paolo Bonzini, 2021/05/24
- [PULL 05/28] i386/cpu: Expose AVX_VNNI instruction to guest, Paolo Bonzini, 2021/05/24
- [PULL 14/28] KVM: Simplify dirty log sync in kvm_set_phys_mem, Paolo Bonzini, 2021/05/24
- [PULL 15/28] KVM: Cache kvm slot dirty bitmap size, Paolo Bonzini, 2021/05/24
- [PULL 24/28] qemu-config: load modules when instantiating option groups, Paolo Bonzini, 2021/05/24
- [PULL 16/28] KVM: Add dirty-ring-size property, Paolo Bonzini, 2021/05/24
- [PULL 23/28] vl: allow not specifying size in -m when using -M memory-backend,
Paolo Bonzini <=
- [PULL 12/28] KVM: Provide helper to get kvm dirty log, Paolo Bonzini, 2021/05/24
- Re: [PULL 00/28] Misc patches for 2021-05-24, no-reply, 2021/05/24
- Re: [PULL 00/28] Misc patches for 2021-05-24, Peter Maydell, 2021/05/24