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

Re: [libvirt] [PATCH v2 2/9] qemu: Only setup vhost if virtType == "kvm"



On Sun, Aug 18, 2013 at 02:57:52PM -0400, Cole Robinson wrote:
> vhost only works in KVM mode at the moment, and is infact compiled
> out if the emulator is built for non-native architecture. While it
> may work at some point in the future for plain qemu, for now it's
> just noise on the command line (and which contributes to arm cli
> breakage).
> ---
>  src/qemu/qemu_command.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index 56e0809..8d3a65c 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -441,8 +441,10 @@ qemuOpenVhostNet(virDomainDefPtr def,
>  {
>      size_t i;
>  
> -    /* If the config says explicitly to not use vhost, return now */
> -    if (net->driver.virtio.name == VIR_DOMAIN_NET_BACKEND_TYPE_QEMU) {
> +    /* If running a plain QEMU guest, or
> +     * if the config says explicitly to not use vhost, return now*/
> +    if (def->virtType != VIR_DOMAIN_VIRT_KVM ||
> +        net->driver.virtio.name == VIR_DOMAIN_NET_BACKEND_TYPE_QEMU) {
>          *vhostfdSize = 0;
>          return 0;
>      }

ACK

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 :|


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