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

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

 



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.

 

Thanks,

            Moshe Levi.

 

 

[1] root@r-ufm152:~# virsh nodedev-dumpxml pci_0000_03_00_0

<device>                                              

  <name>pci_0000_03_00_0</name>                        

  <path>/sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0</path>

  <parent>pci_0000_00_02_0</parent>                            

  <driver>                                                      

    <name>mlx5_core</name>                                      

  </driver>                                                    

  <capability type='pci'>

    <domain>0</domain>

    <bus>3</bus>

    <slot>0</slot>

    <function>0</function>

    <product id='0x1013'>MT27700 Family [ConnectX-4]</product>

    <vendor id='0x15b3'>Mellanox Technologies</vendor>

    <capability type='virt_functions'>

      <address domain='0x0000' bus='0x03' slot='0x00' function='0x2'/>

      <address domain='0x0000' bus='0x03' slot='0x00' function='0x3'/>

      <address domain='0x0000' bus='0x03' slot='0x00' function='0x4'/>

      <address domain='0x0000' bus='0x03' slot='0x00' function='0x5'/>

    </capability>

    <iommuGroup number='15'>

      <address domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>

      <address domain='0x0000' bus='0x03' slot='0x00' function='0x1'/>

    </iommuGroup>

    <numa node='0'/>

    <pci-express>

      <link validity='cap' port='0' speed='8' width='16'/>

      <link validity='sta' speed='8' width='16'/>

    </pci-express>

  </capability>

</device>

 

 

[2] root@r-ufm152:~# virsh nodedev-dumpxml pci_0000_03_00_1

<device>

  <name>pci_0000_03_00_1</name>

  <path>/sys/devices/pci0000:00/0000:00:02.0/0000:03:00.1</path>

  <parent>pci_0000_00_02_0</parent>

  <driver>

    <name>mlx5_core</name>

  </driver>

  <capability type='pci'>

    <domain>0</domain>

    <bus>3</bus>

    <slot>0</slot>

    <function>1</function>

    <product id='0x1013'>MT27700 Family [ConnectX-4]</product>

    <vendor id='0x15b3'>Mellanox Technologies</vendor>

    <iommuGroup number='15'>

      <address domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>

      <address domain='0x0000' bus='0x03' slot='0x00' function='0x1'/>

    </iommuGroup>

    <numa node='0'/>

    <pci-express>

      <link validity='cap' port='0' speed='8' width='16'/>

      <link validity='sta' speed='8' width='16'/>

    </pci-express>

  </capability>

</device>

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