* [Qemu-devel] [PATCH 1/1] hw/arm/virt: Make host as default CPU type on AArch64
@ 2015-03-19 14:53 Wei Huang
2015-03-19 14:55 ` Peter Maydell
0 siblings, 1 reply; 2+ messages in thread
From: Wei Huang @ 2015-03-19 14:53 UTC (permalink / raw)
To: qemu-devel; +Cc: peter.maydell, pbonzini
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(+)
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 */
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH 1/1] hw/arm/virt: Make host as default CPU type on AArch64
2015-03-19 14:53 [Qemu-devel] [PATCH 1/1] hw/arm/virt: Make host as default CPU type on AArch64 Wei Huang
@ 2015-03-19 14:55 ` Peter Maydell
0 siblings, 0 replies; 2+ messages in thread
From: Peter Maydell @ 2015-03-19 14:55 UTC (permalink / raw)
To: Wei Huang; +Cc: Paolo Bonzini, QEMU Developers
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-03-19 14:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-19 14:53 [Qemu-devel] [PATCH 1/1] hw/arm/virt: Make host as default CPU type on AArch64 Wei Huang
2015-03-19 14:55 ` Peter Maydell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.