Re: [PATCH 10/12] virCaps: Introduce IOMMU and VFIO capabilities

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

 



On Thu, May 29, 2014 at 10:32:44AM +0200, Michal Privoznik wrote:
> There's no need to check for these two host capabilities on each
> device attach or detach. It's sufficient to check them on the daemon
> start and then just query them from virCaps when needed. Moreover,
> this way it's fairly simple to expose them in capabilities XML.

Unless I'm missing something, this patch is not exposing them in
the capabilities XML, as it hasn't modified the XML formatting
code at all ?


> diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c
> index cf474d7..9561ba3 100644
> --- a/src/conf/capabilities.c
> +++ b/src/conf/capabilities.c
> @@ -1068,3 +1068,49 @@ virCapabilitiesGetCpusForNodemask(virCapsPtr caps,
>  
>      return ret;
>  }
> +
> +
> +int
> +virCapabilitiesGetKVMLegacy(virCapsPtr caps,
> +                                bool *legacy)
> +{
> +    if (!caps)
> +        return -1;
> +
> +    *legacy = caps->host.legacyKVMPassthrough;
> +    return 0;
> +}
> +
> +int
> +virCapabilitiesSetKVMLegacy(virCapsPtr caps,
> +                            bool legacy)
> +{
> +    if (!caps)
> +        return -1;
> +
> +    caps->host.legacyKVMPassthrough = legacy;
> +    return 0;
> +}
> +
> +
> +int
> +virCapabilitiesGetVFIO(virCapsPtr caps,
> +                       bool *vfio)
> +{
> +    if (!caps)
> +        return -1;
> +
> +    *vfio = caps->host.VFIOPassthrough;
> +    return 0;
> +}
> +
> +int
> +virCapabilitiesSetVFIO(virCapsPtr caps,
> +                       bool vfio)
> +{
> +    if (!caps)
> +        return -1;
> +
> +    caps->host.VFIOPassthrough = vfio;
> +    return 0;
> +}

I'd expect this file to have modified the XML formatter.


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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]