[libvirt] how to know if PCI device has SR-IOV PF capability

Daniel P. Berrange berrange at redhat.com
Mon Nov 23 10:05:07 UTC 2015


On Sun, Nov 22, 2015 at 11:04:28AM +0000, Moshe Levi wrote:
> Hi,
> 
> I was looking on the output of virsh nodedev-dumpxml on a PCI to see if it has SR-IOV PF  capability.
> It seem that if the virtual functions are enables the xml look like [1] but if the PCI has no VFs enabled the
> output is like in [2].
> As you can see for PCI which has  no VFs the <capability type='virt_functions'>  tag doen't exist.
> Is this by design?
> I would except that <capability type='virt_functions'/> tag with empty elements will also be include in that case.

That is an bug. The capability should be reported regardless of whether
any are VFs currently enabled, so we should fix this.



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