]> git.proxmox.com Git - mirror_qemu.git/commit
vl.c: move -m parsing after memory backends has been processed
authorIgor Mammedov <imammedo@redhat.com>
Wed, 19 Feb 2020 16:08:40 +0000 (11:08 -0500)
committerPatchew Importer <importer@patchew.org>
Wed, 19 Feb 2020 16:49:54 +0000 (16:49 +0000)
commita1b18df9a4848fc8a906e40c275063bfe9ca2047
tree00f0eecff29d1e85542565577e6fc010c4913347
parent6b61c2c596e7ad957f87ace619a5419ff0723bd7
vl.c: move -m parsing after memory backends has been processed

It will be possible for main RAM to come from memory-backend
and we should check that size specified in -m matches the size
of the backend and [MachineState::]ram_size also matches
backend's size.

However -m parsing (set_memory_options()) happens before backends
are intialized (object_create_delayed()) which complicates it.
Consolidate set_memory_options() and assigning parsed results to
current_machine after backends are initialized, so it would be
possible access the initialized backend instance to compare
sizes.

This patch only consolidates scattered places touching ram_size
within vl.c. And follow up patch will integrate backend handling
to set_memory_options().

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20200219160953.13771-7-imammedo@redhat.com>
vl.c