Ard Biesheuvel 886bc7a049 hw/arm/virt: fix cmdline parsing bug with CPU options and smp > 1
The recently introduced feature that allows 32 bit guests to be
executed under KVM on a 64-bit host incorrectly handles the case
where more than 1 cpu is specified using '-smp N'

For instance, this invocation of qemu

  qemu-system-aarch64 -M virt -cpu cortex-a57,aarch64=off -smp 2

produces the following error

  qemu-system-aarch64: Expected key=value format, found aarch64

which is caused by the destructive parsing performed by
cpu_common_parse_features(), resulting in subsequent attempts
to parse the CPU option string (for each additional CPU) to fail.

So duplicate the string before parsing it, and free it directly
afterwards.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Greg Bellows <greg.bellows@linaro.org>
Message-id: 1425402380-10488-1-git-send-email-ard.biesheuvel@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-03-11 13:21:05 +00:00
2015-03-04 13:00:36 -05:00
2013-04-18 13:50:53 +02:00
2015-02-06 16:11:38 +00:00
2015-03-10 10:49:25 +01:00
2015-02-12 21:21:38 -08:00
2012-09-07 09:02:44 +03:00
2014-06-16 13:24:35 +02:00
2013-09-05 09:40:31 -05:00
2015-02-23 10:56:09 -05:00
2013-10-11 09:34:56 -07:00
2015-02-16 17:30:19 +01:00
2015-01-07 16:16:26 +01:00
2013-07-23 02:41:31 +02:00
2015-03-04 14:47:52 +01:00
2015-03-10 10:49:25 +01:00
2015-02-05 17:16:14 +01:00
2015-02-16 14:36:03 +00:00
2015-02-16 15:07:19 +00:00
2014-05-24 00:07:29 +04:00
2015-03-10 11:33:35 +01:00
2013-10-11 09:34:56 -07:00
2015-01-14 10:38:57 +01:00
2015-02-12 21:21:38 -08:00
2014-06-05 16:10:33 +02:00
2014-12-09 21:48:34 +00:00
2013-10-11 09:34:56 -07:00
2015-03-10 11:33:39 +01:00

Read the documentation in qemu-doc.html or on http://wiki.qemu-project.org

- QEMU team
S
Description
Languages
C 82.6%
C++ 6.5%
Python 3.3%
Dylan 2.9%
Shell 1.6%
Other 2.9%