qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] accel: Improve selection of the default acceler


From: Daniel P . Berrangé
Subject: Re: [Qemu-devel] [PATCH] accel: Improve selection of the default accelerator
Date: Tue, 9 Oct 2018 14:41:12 +0100
User-agent: Mutt/1.10.1 (2018-07-13)

On Tue, Oct 09, 2018 at 03:14:59PM +0200, Markus Armbruster wrote:
> Markus Armbruster <address@hidden> writes:
> 
> > Peter Maydell <address@hidden> writes:
> >
> >> On 5 October 2018 at 15:13, Thomas Huth <address@hidden> wrote:
> >>> When compiling with "--disable-tcg", we currently still use "tcg"
> >>> as default accelerator. "kvm" should be used in this case instead.
> >>
> >> This part is non-controversial and makes good sense.
> >
> > Agreed.
> >
> >>> Also, some downstream distros provide QEMU binaries which have "kvm"
> >>> in their names (e.g. "qemu-kvm" on RHEL or "kvm" on Ubuntu) that use
> >>> KVM by default - and some users might want to do something similar
> >>> with upstream binaries, too. Accomodate them by using "kvm:tcg" as
> >>> default when we detect such a binary name.
> >>
> >> This part is much riskier and less clearly a good plan --
> >> do we really want our behaviour to vary based on the name
> >> of the executable? Distros who want that sort of qemu-kvm
> >> wrapper generally are providing it already (the Ubuntu one
> >> is a 2-line shell script).
> >
> > I hate it when argv[0] affects behavior[*].  I hate shell wrappers less.
> >
> > If a system provides just one qemu executable, and its default
> > accelerator should be something other than tcg:kvm, then there's a use
> 
> Correction: "other than tcg".  See configure_accelerator().
> 
> Remind me, why is "tcg" a good default?

Note that when libvirt is driving QEMU, the default is not used. Libvirt
will always explicitly ask for either KVM or TCG. Libvirt reports whether
each host supports TCG or KVM or both, and management applications will
look at this and usually pick KVM, only use TCG if KVM isn't there.

IOW, most users of libvirt have effectively had the behaviour of
'-accel kvm:tcg' for years. Only direct users of QEMU have suffered
from '-accel tcg:kvm'.

The only time we've had trouble with this is with buggy nested virt
implementations, which expose /dev/kvm but then crash & burn when it
is used. I don't think that's an argument against prioritizing
KVM though. Its an argument for not exposing broken nested virt to VMs.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



reply via email to

[Prev in Thread] Current Thread [Next in Thread]