From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54761) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4LDm-0001SW-NR for qemu-devel@nongnu.org; Mon, 07 Jul 2014 22:33:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X4LDg-0000I3-HI for qemu-devel@nongnu.org; Mon, 07 Jul 2014 22:33:30 -0400 Received: from 63-248-144-38.static.layl0103.digis.net ([63.248.144.38]:54248 helo=suse.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4LDg-0000Hd-A4 for qemu-devel@nongnu.org; Mon, 07 Jul 2014 22:33:24 -0400 From: Bruce Rogers Date: Mon, 7 Jul 2014 17:05:22 -0600 Message-Id: <1404774322-5709-1-git-send-email-brogers@suse.com> Subject: [Qemu-devel] [PATCH] vl.c: Keep maxram_size and ram_size consistent unless specified otherwise List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: imammedo@redhat.com, Bruce Rogers , aliguori@amazon.com, mst@redhat.com When using a memory size less than the default amount with older pc machine types, a failure occurs because of the way maxram_size and ram_size get initialized. Keep maxram_size and ram_size the same, except when maxmem is specified on the command line. Signed-off-by: Bruce Rogers --- vl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vl.c b/vl.c index 6e084c2..0cb8c10 100644 --- a/vl.c +++ b/vl.c @@ -3345,7 +3345,6 @@ int main(int argc, char **argv, char **envp) RAM_ADDR_FMT ")\n", slots, sz, ram_size); exit(EXIT_FAILURE); } - maxram_size = sz; ram_slots = slots; } else if ((!maxmem_str && slots_str) || (maxmem_str && !slots_str)) { @@ -3353,6 +3352,7 @@ int main(int argc, char **argv, char **envp) "'%s' option\n", slots_str ? "maxmem" : "slots"); exit(EXIT_FAILURE); } + maxram_size = sz; break; } #ifdef CONFIG_TPM -- 1.9.0