pc: fix qemu exiting with error when -m X < 128 with old machines types
commit4ec6ee5acef8092ec64e183694aba2a1cfce8d80
authorIgor Mammedov <imammedo@redhat.com>
Tue, 8 Jul 2014 13:29:46 +0000 (8 15:29 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 11 Jul 2014 18:05:14 +0000 (11 21:05 +0300)
tree04075799b8dabd6b513361a733926c4a121cfb9e
parent3f0838ab8557c6071a5931183b2d7fed568cd35c
pc: fix qemu exiting with error when -m X < 128 with old machines types

If machine doesn't support memory hotplug then staring QEMU
with initial memory less than default will make QEMU exit with
following error message:

$QEMU -m 16  -M isapc
qemu-system-i386: "-memory 'slots|maxmem'" is not supported by: isapc

Set maxram_size to initial memory value before parsing
'maxmem' option allows to keep maxmem in sync with initial
memory size if no maxmem option was specified.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
CC: Bruce Rogers <brogers@suse.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
vl.c