]> git.ipfire.org Git - thirdparty/qemu.git/commit
vl: allow not specifying size in -m when using -M memory-backend
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 17 May 2021 14:13:01 +0000 (10:13 -0400)
committerMichael Roth <michael.roth@amd.com>
Thu, 14 Oct 2021 20:10:19 +0000 (15:10 -0500)
commitb20eff3ba44576dad70b76969870837de7105ba3
tree6f00017b7ca42882d8663ba4b3ea9b15da4113d7
parent59ac5e6d61fcf95d723c7191711ff9b7f6462320
vl: allow not specifying size in -m when using -M memory-backend

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>
(cherry picked from commit d349f92f78d26db2805ca39a7745cc70affea021)
Signed-off-by: Michael Roth <michael.roth@amd.com>
softmmu/vl.c