Richard W.M. Jones
2014-Aug-07 13:28 UTC
[libvirt-users] Passing literal -cpu model string to qemu
On aarch64 with -M virt, the default CPU model is cortex-a15 (a 32 bit CPU). This is IMHO a stupid default, but there we are. Therefore most users will need to pass the `-cpu cortex-a53' or `-cpu cortex-a57' flag to qemu, depending on a complex formula of their host CPU and if they are using TCG or not. However I cannot work out how to pass this through libvirt. The obvious one would be: <cpu><model>cortex-a57</model></cpu> This passes `-cpu host' which is both wrong and likely to be a bug. I tried adding various flags and studying the source, but it's extremely non-obvious how to do this. Also adding the following into cpu_map.xml didn't make any difference: --- a/src/cpu/cpu_map.xml +++ b/src/cpu/cpu_map.xml @@ -626,6 +626,11 @@ <vendor name='IBM'/> <pvr value='0x004b0100'/> </model> + </arch> + <!-- ARM, 64 bit --> + <arch name='aarch64'> + <model name='cortex-a53'/> + <model name='cortex-a57'/> </arch> </cpus> Ideas here? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/
Daniel P. Berrange
2014-Aug-11 09:27 UTC
Re: [libvirt-users] Passing literal -cpu model string to qemu
On Thu, Aug 07, 2014 at 02:28:05PM +0100, Richard W.M. Jones wrote:> On aarch64 with -M virt, the default CPU model is cortex-a15 (a 32 bit > CPU). This is IMHO a stupid default, but there we are. Therefore > most users will need to pass the `-cpu cortex-a53' or `-cpu cortex-a57' > flag to qemu, depending on a complex formula of their host CPU and if > they are using TCG or not. > > However I cannot work out how to pass this through libvirt. > > The obvious one would be: > > <cpu><model>cortex-a57</model></cpu> > > This passes `-cpu host' which is both wrong and likely to be a bug. > > I tried adding various flags and studying the source, but it's > extremely non-obvious how to do this. Also adding the following into > cpu_map.xml didn't make any difference:IIRC we don't have the CPU model stuff written for ARM architecture yet. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
Reasonably Related Threads
- [RFC] Making -mcpu=generic the default for ARM armv7a and arm8a rather than -mcpu=cortex-a8 or -mcpu=cortex-a53
- [RFC] Making -mcpu=generic the default for ARM armv7a and arm8a rather than -mcpu=cortex-a8 or -mcpu=cortex-a53
- [LLVMdev] aarch64 status for generating SIMD instructions
- [LLVMdev] Contributing the Apple ARM64 compiler backend
- [LLVMdev] aarch64 status for generating SIMD instructions