qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] vl.c: Keep maxram_size and ram_size consistent unle


From: Bruce Rogers
Subject: [Qemu-devel] [PATCH] vl.c: Keep maxram_size and ram_size consistent unless specified otherwise
Date: Mon, 7 Jul 2014 17:05:22 -0600

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 <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]