Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1517372 - nodedev-dumpxml PCI node devices don't get device details
Summary: nodedev-dumpxml PCI node devices don't get device details
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.5
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: John Ferlan
QA Contact: Jingjing Shao
URL:
Whiteboard:
: 1509805 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-24 17:00 UTC by John Ferlan
Modified: 2018-04-10 11:01 UTC (History)
7 users (show)

Fixed In Version: libvirt-3.9.0-4.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 11:00:58 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:0704 None None None 2018-04-10 11:01:32 UTC

Description John Ferlan 2017-11-24 17:00:09 UTC
Description of problem:



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. virsh nodedev-list pci 
2. Using an entry from the list (and not pci_0000_00_00_0):
   virsh nodedev-dumpxml <entry>

Actual results:

1.  virsh nodedev-list pci
pci_0000_00_00_0
pci_0000_00_01_0
pci_0000_00_02_0
pci_0000_00_03_0
...
pci_0000_01_00_0
pci_0000_02_00_0
pci_0000_03_00_0


2. virsh nodedev-dumpxml 
pci_0000_02_00_0
<device>
  <name>pci_0000_02_00_0</name>
  <path>/sys/devices/pci0000:00/0000:00:1c.0/0000:02:00.0</path>
  <parent>pci_0000_00_1c_0</parent>
  <driver>
    <name>sdhci-pci</name>
  </driver>
  <capability type='pci'>
    <domain>0</domain>
    <bus>2</bus>
    <slot>0</slot>
    <function>0</function>
    <product id='0x8520'>SD/MMC Card Reader Controller</product>
    <vendor id='0x1217'>O2 Micro, Inc.</vendor>
  </capability>
</device>


Expected results:

2. virsh nodedev-dumpxml pci_0000_02_00_0
<device>
  <name>pci_0000_02_00_0</name>
  <path>/sys/devices/pci0000:00/0000:00:1c.0/0000:02:00.0</path>
  <parent>pci_0000_00_1c_0</parent>
  <driver>
    <name>sdhci-pci</name>
  </driver>
  <capability type='pci'>
    <domain>0</domain>
    <bus>2</bus>
    <slot>0</slot>
    <function>0</function>
    <product id='0x8520'>SD/MMC Card Reader Controller</product>
    <vendor id='0x1217'>O2 Micro, Inc.</vendor>
    <pci-express>
      <link validity='cap' port='0' speed='2.5' width='1'/>
      <link validity='sta' speed='2.5' width='1'/>
    </pci-express>
  </capability>
</device>


NOTE: The <pci-express> device details


Additional info:

Need to backport upstream commit '9bfcf3cc' to properly set privileged field

Comment 3 Xuesong Zhang 2017-11-27 07:08:30 UTC
hi, John,

It seems this BZ is duplicated with one BZ QE found before, which is BZ 1509805.

Comment 4 Erik Skultety 2017-11-27 08:46:12 UTC
*** Bug 1509805 has been marked as a duplicate of this bug. ***

Comment 5 Erik Skultety 2017-11-27 08:52:22 UTC
Since the upstream commit hasn't been mentioned here:

commit 9bfcf3ccdd2a0bb599dff27f97d5c1524cba1b79
Author:     John Ferlan <jferlan@redhat.com>
AuthorDate: Wed Nov 22 10:34:11 2017 -0500
Commit:     John Ferlan <jferlan@redhat.com>
CommitDate: Fri Nov 24 07:17:37 2017 -0500

    nodedev: Restore setting of privileged
    
    Commit id '36555364' removed the setting of the driver->privileged,
    which the udevProcessPCI would need in order to read the PCI device
    configs.
    
    Signed-off-by: John Ferlan <jferlan@redhat.com>

I closed https://bugzilla.redhat.com/show_bug.cgi?id=1509805 as duplicate.

Comment 7 Jingjing Shao 2017-12-04 11:20:06 UTC
Verify this bug as below with libvirt-3.9.0-4.el7.x86_64


# virsh nodedev-list --tree
   +- pci_0000_13_00_1
  |   |   |
  |   |   +- net_ens6f1_90_e2_ba_11_d7_a5
  |   |     
  |   +- pci_0000_13_10_0
  |   |   |
  |   |   +- net_enp19s16_96_a1_94_e6_8a_86


# virsh nodedev-dumpxml pci_0000_13_00_1
<device>
  <name>pci_0000_13_00_1</name>
  <path>/sys/devices/pci0000:00/0000:00:07.0/0000:13:00.1</path>
  <parent>pci_0000_00_07_0</parent>
  <driver>
    <name>ixgbe</name>
  </driver>
  <capability type='pci'>
    <domain>0</domain>
    <bus>19</bus>
    <slot>0</slot>
    <function>1</function>
    <product id='0x10fb'>82599ES 10-Gigabit SFI/SFP+ Network Connection</product>
    <vendor id='0x8086'>Intel Corporation</vendor>
    <capability type='virt_functions' maxCount='63'>
      <address domain='0x0000' bus='0x13' slot='0x10' function='0x1'/>
      <address domain='0x0000' bus='0x13' slot='0x10' function='0x3'/>
      <address domain='0x0000' bus='0x13' slot='0x10' function='0x5'/>
      <address domain='0x0000' bus='0x13' slot='0x10' function='0x7'/>
    </capability>
    <iommuGroup number='18'>
      <address domain='0x0000' bus='0x13' slot='0x00' function='0x1'/>
    </iommuGroup>
    <numa node='0'/>
    <pci-express>
      <link validity='cap' port='0' speed='5' width='8'/>
      <link validity='sta' speed='5' width='8'/>
    </pci-express>
  </capability>
</device>


# virsh nodedev-dumpxml pci_0000_13_10_0
<device>
  <name>pci_0000_13_10_0</name>
  <path>/sys/devices/pci0000:00/0000:00:07.0/0000:13:10.0</path>
  <parent>pci_0000_00_07_0</parent>
  <driver>
    <name>ixgbevf</name>
  </driver>
  <capability type='pci'>
    <domain>0</domain>
    <bus>19</bus>
    <slot>16</slot>
    <function>0</function>
    <product id='0x10ed'>82599 Ethernet Controller Virtual Function</product>
    <vendor id='0x8086'>Intel Corporation</vendor>
    <capability type='phys_function'>
      <address domain='0x0000' bus='0x13' slot='0x00' function='0x0'/>
    </capability>
    <iommuGroup number='84'>
      <address domain='0x0000' bus='0x13' slot='0x10' function='0x0'/>
    </iommuGroup>
    <numa node='0'/>
    <pci-express>
      <link validity='cap' port='0' width='0'/>
      <link validity='sta' width='0'/>
    </pci-express>
  </capability>
</device>

Comment 11 errata-xmlrpc 2018-04-10 11:00:58 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2018:0704


Note You need to log in before you can comment on or make changes to this bug.