pc: fix qemu exiting with error when -m X < 128 with old machines types
PATCH 1/1 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.
--- vl.c | 1 + 1 file changed, 1 insertion(+)
vl.c +1 -0
@@ -3315,6 +3315,7 @@ int main(int argc, char **argv, char **envp)error_report ("ram size too large" );exit (EXIT_FAILURE ); } + maxram_size = ram_size; maxmem_str =qemu_opt_get (opts,"maxmem" ); slots_str =qemu_opt_get (opts,"slots" );
Signature · 1 line
1.8.5.2 (Apple Git-48)
Michael S. Tsirkin
AppliedQuoted 7 lines · Igor Mammedov
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
Quoted 6 lines
Set
maxram_sizeto 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 <[email protected]>CC Bruce Rogers <[email protected]>
OK this is a regression fix so we need it for 2.1.
Applied, thanks!
Quoted 18 lines
--- vl.c | 1 + 1 file changed, 1 insertion(+)vl.c +1
-0@@ -3315,6 +3315,7 @@ int main(int argc, char **argv, char **envp)error_report ("ram size too large" );exit (EXIT_FAILURE ); } + maxram_size = ram_size; maxmem_str =qemu_opt_get (opts,"maxmem" ); slots_str =qemu_opt_get (opts,"slots" );Signature · 1 line
1.8.5.2 (Apple Git-48)
Quoted 34 lines
Quoted 1 line
Quoted 1 line · On 7/11/2014 at 12:06 PM, <[email protected]> wrote:
Quoted 7 lines · Igor Mammedov
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: isapcQuoted 6 lines
Set
maxram_sizeto 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 <[email protected]>CC Bruce Rogers <[email protected]>OK this is a regression fix so we need it for 2.1.
Applied, thanks!
Quoted 14 lines
--- vl.c | 1 + 1 file changed, 1 insertion(+)vl.c +1
-0@@ -3315,6 +3315,7 @@ int main(int argc, char **argv, char **envp)error_report ("ram size too large" );exit (EXIT_FAILURE ); } + maxram_size = ram_size;
Quoted 4 lines
Quoted 4 lines
vl.c +0
-0maxmem_str =qemu_opt_get (opts,"maxmem" ); slots_str =qemu_opt_get (opts,"slots" );Signature · 1 line
1.8.5.2 (Apple Git-48)
Hopefully this hasn't been forgotten. This is a bad regression for pre v2.1 pc machine types.
Bruce
Quoted 23 lines
Quoted 1 line
Quoted 1 line · On 7/8/2014 at 07:29 AM, <[email protected]> wrote:
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: isapcSet
maxram_sizeto 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 <[email protected]>CC Bruce Rogers <[email protected]>--- vl.c | 1 + 1 file changed, 1 insertion(+)vl.c +0
-0
vl.c int main(int argc, char **argv, char **envp) · line 3321
Quoted 7 lines
vl.c +1
-0@@ -3315,6 +3315,7 @@ int main(int argc, char **argv, char **envp)error_report ("ram size too large" );exit (EXIT_FAILURE ); } + maxram_size = ram_size; maxmem_str =qemu_opt_get (opts,"maxmem" ); slots_str =qemu_opt_get (opts,"slots" );
Peter Maydell
AppliedQuoted 28 lines · Bruce Rogers
Quoted 28 lines
Quoted 1 line
Quoted 1 line · On 7/8/2014 at 07:29 AM, <[email protected]> wrote:
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: isapcSet
maxram_sizeto 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 <[email protected]>CC Bruce Rogers <[email protected]>--- vl.c | 1 + 1 file changed, 1 insertion(+)vl.c +1
-0@@ -3315,6 +3315,7 @@ int main(int argc, char **argv, char **envp)error_report ("ram size too large" );exit (EXIT_FAILURE ); } + maxram_size = ram_size;
Quoted 5 lines
vl.c int main(int argc, char **argv, char **envp) · line 3321
Quoted 2 lines
vl.c +0
-0maxmem_str =qemu_opt_get (opts,"maxmem" ); slots_str =qemu_opt_get (opts,"slots" );Reviewed-by Bruce Rogers <[email protected]>
Applied to master, thanks.
-- PMM