[libvirt] [PATCH] qemuConnectGetDomainCapabilities: Use wiser defaults

Daniel P. Berrange berrange at redhat.com
Thu Jul 17 09:28:07 UTC 2014


On Thu, Jul 17, 2014 at 11:12:05AM +0200, Michal Privoznik wrote:
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 33541d3..7d99435 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -16849,17 +16849,17 @@ qemuConnectGetDomainCapabilities(virConnectPtr conn,
>      char *ret = NULL;
>      virQEMUDriverPtr driver = conn->privateData;
>      virQEMUCapsPtr qemuCaps = NULL;
> -    int virttype; /* virDomainVirtType */
> +    int virttype = VIR_DOMAIN_VIRT_KVM; /* virDomainVirtType */

Isn't this going to always fail when we run inside a guest which does not
have nested virt? When we know the QEMU binary, we probe to see whether
it can do KVM or not, so could we postpone this decision about virt type
until after we've checked if KVM was available ?

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




More information about the libvir-list mailing list