Message ID | 1426776801-17869-1-git-send-email-wei@redhat.com |
---|---|
State | New |
Headers | show |
On 19 March 2015 at 14:53, Wei Huang <wei@redhat.com> wrote: > Currently mach-virt machine model uses cortex-a15 as default CPU when > -cpu option is missing. This caused confusion to certain virt tools > (e.g. libvirt, virt-install) which don't suppply -cpu option while > invoking qemu-kvm. To solve this problem this patch changes the default > CPU type to "host" when target is AArch64. > > NOTE: It doesn't use "cortex-a57" as default CPU type because cortex-a57 > doesn't work on some 64bit ARM machine, such as APM Mustang. "host" is > a safe bet for all AArch64 machines. This won't work if you're not using KVM, since 'host' isn't a valid CPU type there, and it will break working command lines as well. Also it breaks the current invariant of "command lines on qemu-system-arm also work on qemu-system-aarch64". I don't like the place we've ended up with the command line setup for the 64-bit virt board, but I don't think this is the correct fix... -- PMM
diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 9072bc2..1e8371c 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -731,7 +731,11 @@ static void machvirt_init(MachineState *machine) char **cpustr; if (!cpu_model) { +#if defined(TARGET_AARCH64) + cpu_model = "host"; +#else cpu_model = "cortex-a15"; +#endif } /* Separate the actual CPU model name from any appended features */
Currently mach-virt machine model uses cortex-a15 as default CPU when -cpu option is missing. This caused confusion to certain virt tools (e.g. libvirt, virt-install) which don't suppply -cpu option while invoking qemu-kvm. To solve this problem this patch changes the default CPU type to "host" when target is AArch64. NOTE: It doesn't use "cortex-a57" as default CPU type because cortex-a57 doesn't work on some 64bit ARM machine, such as APM Mustang. "host" is a safe bet for all AArch64 machines. Signed-off-by: Wei Huang <wei@redhat.com> --- hw/arm/virt.c | 4 ++++ 1 file changed, 4 insertions(+)