<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.7601.19038"></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt 微软雅黑">
<DIV><BR><BR>>>> Jim Fehlig <jfehlig@suse.com> 2017/3/23 星期四 上午 1:33 >>><BR>......</DIV>
<DIV>>> is not a good idea, but as far as I know, SR-IOV status can't be<BR>>> detected from<BR>>> nodedev XML so far.<BR>><BR>>I think it is possible to determine SR-IOV capabilities from the nodedev XML<BR>><BR>># virsh nodedev-dumpxml pci_0000_09_00_2<BR>><device><BR>>  <name>pci_0000_09_00_2</name><BR>>  <path>/sys/devices/pci0000:00/0000:00:1c.0/0000:09:00.2</path><BR>>  <parent>pci_0000_00_1c_0</parent><BR>>  <driver><BR>>    <name>igb</name><BR>>  </driver><BR>>  <capability type='pci'><BR>>    <domain>0</domain><BR>>    <bus>9</bus><BR>>    <slot>0</slot><BR>>    <function>2</function><BR>>    <product id='0x1521'>I350 Gigabit Network Connection</product><BR>>    <vendor id='0x8086'>Intel Corporation</vendor><BR>>    <capability type='virt_functions' maxCount='7'><BR>>      <address domain='0x0000' bus='0x0a' slot='0x10' function='0x2'/><BR>>      <address domain='0x0000' bus='0x0a' slot='0x10' function='0x6'/><BR>>      <address domain='0x0000' bus='0x0a' slot='0x11' function='0x2'/><BR>>      <address domain='0x0000' bus='0x0a' slot='0x11' function='0x6'/><BR>>      <address domain='0x0000' bus='0x0a' slot='0x12' function='0x2'/><BR>>      <address domain='0x0000' bus='0x0a' slot='0x12' function='0x6'/><BR>>      <address domain='0x0000' bus='0x0a' slot='0x13' function='0x2'/><BR>>    </capability><BR>>    <numa node='0'/><BR>>    <pci-express><BR>>      <link validity='cap' port='0' speed='5' width='4'/><BR>>      <link validity='sta' speed='5' width='4'/><BR>>    </pci-express><BR>>  </capability><BR>></device><BR>><BR>>So this device has 'virt_functions' capability and currently has 7 configured.<BR>><BR></DIV>
<DIV>Thank you for the information!</DIV>
<DIV>I used to dump the information by "virsh nodedev-dumpxml net_eth0_00_1e_67_94_6a_6b",</DIV>
<DIV>That's why I didn't figure out the SR-IOV information from the output.</DIV>
<DIV> </DIV>
<DIV>Thanks,</DIV>
<DIV>Lin</DIV></BODY></HTML>