Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1142642

Summary: update PF nodedev information related to VF timely
Product: Red Hat Enterprise Linux 7 Reporter: Jincheng Miao <jmiao>
Component: libvirtAssignee: Laine Stump <laine>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: medium    
Version: 7.1CC: dyuan, honzhang, mzhan, rbalakri
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-05-06 16:20:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jincheng Miao 2014-09-17 07:10:40 UTC
Description of problem:
For SR-IOV node devices, libvirt should update PF nodedev information
related to VF timely.
When the SR-IOV driver is removed, related VF will disappear, then
nodedev-dumpxml should not list VF information for related PF.

Version-Release number of selected component (if applicable):
libvirt-1.2.8-2.el7.x86_64.rpm
kernel-3.10.0-160.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. list SRIOV PFs and VFs:
# lspci | grep Eth
44:00.0 Ethernet controller: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01)
44:00.1 Ethernet controller: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01)
44:10.0 Ethernet controller: Intel Corporation 82599 Ethernet Controller Virtual Function (rev 01)
44:10.1 Ethernet controller: Intel Corporation 82599 Ethernet Controller Virtual Function (rev 01)

2. dump a PF
# virsh nodedev-dumpxml pci_0000_44_00_0
<device>
  <name>pci_0000_44_00_0</name>
<path>/sys/devices/pci0000:40/0000:40:0b.0/0000:44:00.0</path>
  <parent>pci_0000_40_0b_0</parent>
  <driver>
    <name>ixgbe</name>
  </driver>
  <capability type='pci'>
    <domain>0</domain>
    <bus>68</bus>
    <slot>0</slot>
    <function>0</function>
    <product id='0x10fb'>82599ES 10-Gigabit SFI/SFP+ Network Connection</product>
    <vendor id='0x8086'>Intel Corporation</vendor>
    <capability type='virt_functions'>
      <address domain='0x0000' bus='0x44' slot='0x10' function='0x0'/>
    </capability>
    <iommuGroup number='16'>
      <address domain='0x0000' bus='0x44' slot='0x00' function='0x0'/>
      <address domain='0x0000' bus='0x44' slot='0x00' function='0x1'/>
    </iommuGroup>
    <pci-express>
      <link validity='cap' port='0' speed='5' width='8'/>
      <link validity='sta' speed='5' width='8'/>
    </pci-express>
  </capability>
</device>

3. remove ixgbe driver, then VF disappears
# modprobe -r ixgbe

# lspci | grep Eth
44:00.0 Ethernet controller: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01)
44:00.1 Ethernet controller: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01)

4. dump that PF, VF information is still there
# virsh nodedev-dumpxml pci_0000_44_00_0
<device>
  <name>pci_0000_44_00_0</name>
<path>/sys/devices/pci0000:40/0000:40:0b.0/0000:44:00.0</path>
  <parent>pci_0000_40_0b_0</parent>
  <capability type='pci'>
    <domain>0</domain>
    <bus>68</bus>
    <slot>0</slot>
    <function>0</function>
    <product id='0x10fb'>82599ES 10-Gigabit SFI/SFP+ Network Connection</product>
    <vendor id='0x8086'>Intel Corporation</vendor>
    <capability type='virt_functions'>
      <address domain='0x0000' bus='0x44' slot='0x10' function='0x0'/>
    </capability>
    <iommuGroup number='16'>
      <address domain='0x0000' bus='0x44' slot='0x00' function='0x0'/>
      <address domain='0x0000' bus='0x44' slot='0x00' function='0x1'/>
    </iommuGroup>
    <pci-express>
      <link validity='cap' port='0' speed='5' width='8'/>
      <link validity='sta' speed='5' width='8'/>
    </pci-express>
  </capability>
</device>

Expected result:
in step 4, no following:
    <capability type='virt_functions'>
      <address domain='0x0000' bus='0x44' slot='0x10' function='0x0'/>
    </capability>

Comment 1 Laine Stump 2015-02-12 17:39:43 UTC
I could have sworn there was a BZ about this (and a fix) quite some time ago...

The problem was (and apparently still is?) that the nodedev driver reads all the device info once when libvirt starts and caches it, which turns out to be a very bad idea. I'll try to see what happened to that.

Comment 2 Laine Stump 2015-05-06 16:20:29 UTC
Okay, now I've found the original report: Bug 981546

*** This bug has been marked as a duplicate of bug 981546 ***