[fedora-virt] qemu-kvm, virtio and arguments for best performance

Richard W.M. Jones rjones at redhat.com
Sun Jul 3 19:24:08 UTC 2011


On Sun, Jul 03, 2011 at 11:37:58AM -0600, Petrus de Calguarium wrote:
> Avi Kivity wrote:
> 
> > On 07/02/2011 12:34 AM, Petrus de Calguarium wrote:
> >> 2. qemu-kvm -cpu ? mentions the arguments -cpu core2duo, kvm64, qemu64
> >> and others, but, from the list provided, it is unclear which I am to
> >> use. I have been using core2duo. Does this refer to my physical or
> >> virtual computer? Which should I choose? I want my virtual machine to
> >> be as close as possible to a clone of my real machine, for the
> >> purposes of running the virtual machine.
> > 
> > This is -cpu host.
> > 
> 
> OK. So core2duo would appear to be the closest match to the host.

Avi means literally "-cpu host".

All that the -cpu option does is to change which CPUID bits are
exposed up to the guest.  "-cpu host" means to expose the same flags,
CPU type etc to the guest as found on the host.  It doesn't change the
CPU emulation.

https://secure.wikimedia.org/wikipedia/en/wiki/CPUID

If you used, say, -cpu core2duo and the physical CPU was not a Core 2,
then the guest would see CPUID returning the core2duo CPU type, but
the CPU itself would behave like its (non-core2duo) self.  In theory
this could cause problems: the kernel or application software might
try to use instructions that are only available on Core 2, but since
these instructions aren't actually there you'd get some sort of fault.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/


More information about the virt mailing list