Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 583064 - Virtio Net/Disk block devices get wrong parent in node device info
Virtio Net/Disk block devices get wrong parent in node device info
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel (Show other bugs)
6.0
All Linux
medium Severity medium
: beta
: 6.1
Assigned To: Michael S. Tsirkin
Virtualization Bugs
:
: 668779 (view as bug list)
Depends On:
Blocks: 570130 580954
  Show dependency treegraph
 
Reported: 2010-04-16 11:03 EDT by Daniel Berrange
Modified: 2013-01-09 17:27 EST (History)
9 users (show)

See Also:
Fixed In Version: kernel-2.6.32-112.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 570130
Environment:
Last Closed: 2011-05-23 16:20:52 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
guest dumpxml (3.41 KB, text/plain)
2011-02-15 03:53 EST, Shirley Zhou
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0542 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 6.1 kernel security, bug fix and enhancement update 2011-05-19 07:58:07 EDT

  None (edit)
Comment 1 Daniel Berrange 2010-04-16 11:04:49 EDT
This libvirt bug actually appears to be a result of the virtio disk/net drivers not providing correct links in sysfs, not associating to the PCI device.
Comment 2 Daniel Berrange 2010-04-16 11:11:38 EDT
In this example, eth2 is a virtio device and eth3 is an e1000 device, both are PCI devices.

The virtio device (eth2) does not link to its PCI device:

[root@dhcp-0-232 net]# cd /sys/class/net
[root@dhcp-0-232 net]# ls -al eth2 eth3
lrwxrwxrwx. 1 root root 0 Apr 16 16:06 eth2 -> ../../devices/virtio-pci/virtio2/net/eth2
lrwxrwxrwx. 1 root root 0 Apr 16 16:06 eth3 -> ../../devices/pci0000:00/0000:00:06.0/net/eth3
[root@dhcp-0-232 net]# ls -al eth2/device eth3/device
lrwxrwxrwx. 1 root root 0 Apr 16 16:09 eth2/device -> ../../../virtio2
lrwxrwxrwx. 1 root root 0 Apr 16 16:09 eth3/device -> ../../../0000:00:06.0
Comment 4 RHEL Product and Program Management 2010-04-16 12:08:05 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 5 RHEL Product and Program Management 2010-07-15 10:00:11 EDT
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release. It has
been denied for the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **
Comment 8 RHEL Product and Program Management 2010-11-16 04:11:06 EST
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux maintenance release. Product Management has 
requested further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed 
products. This request is not yet committed for inclusion in an Update release.
Comment 10 Michael S. Tsirkin 2011-01-18 05:38:34 EST
*** Bug 668779 has been marked as a duplicate of this bug. ***
Comment 14 Aristeu Rozanski 2011-02-03 11:19:49 EST
Patch(es) available on kernel-2.6.32-112.el6
Comment 17 Shirley Zhou 2011-02-15 03:52:20 EST
Reproduce this bug with kernel-2.6.32-94.el6.x86_64.

run virsh nodedev-list --tree  inside a virtual machine with 3 virtio nics and 3 virtio blk.

#virsh nodedev-list --tree
computer
 |
  +- block_vda
  +- block_vdb
  +- block_vdc
  +- net_eth0_52_54_00_20_10_67
  +- net_eth1_52_54_00_8d_b0_14
  +- net_eth2_52_54_00_5d_1d_74
  +- net_lo_00_00_00_00_00_00
  +- pci_0000_00_00_0
  +- pci_0000_00_01_0
  +- pci_0000_00_01_1
  |   |
  |   +- scsi_host0
  |   +- scsi_host1
  |     
  +- pci_0000_00_01_2
  |   |
  |   +- usb_usb1
  |       |
  |       +- usb_1_0_1_0
  |       +- usb_1_1
  |           |
  |           +- usb_1_1_1_0
  |             
  +- pci_0000_00_01_3
  +- pci_0000_00_02_0
  +- pci_0000_00_03_0
  +- pci_0000_00_04_0
  +- pci_0000_00_05_0
  +- pci_0000_00_06_0
  +- pci_0000_00_07_0
  +- pci_0000_00_08_0
  +- pci_0000_00_09_0
  +- pci_0000_00_0a_0
For result, we can see 3 virtio nics all linked to 'computer' instead of their
respective PCI devices.

Verify this bug with kernel-2.6.32-115.el6.x86_64 as same guest, same configuration.
#virsh nodedev-list --tree 
computer
 |
  +- net_lo_00_00_00_00_00_00
  +- pci_0000_00_00_0
  +- pci_0000_00_01_0
  +- pci_0000_00_01_1
  |   |
  |   +- scsi_host0
  |   +- scsi_host1
  |     
  +- pci_0000_00_01_2
  |   |
  |   +- usb_usb1
  |       |
  |       +- usb_1_0_1_0
  |       +- usb_1_1
  |           |
  |           +- usb_1_1_1_0
  |             
  +- pci_0000_00_01_3
  +- pci_0000_00_02_0
  +- pci_0000_00_03_0
  |   |
  |   +- net_eth0_52_54_00_20_10_67
  |     
  +- pci_0000_00_04_0
  +- pci_0000_00_05_0
  |   |
  |   +- block_vda
  |     
  +- pci_0000_00_06_0
  +- pci_0000_00_07_0
  |   |
  |   +- block_vdb
  |     
  +- pci_0000_00_08_0
  |   |
  |   +- block_vdc
  |     
  +- pci_0000_00_09_0
  |   |
  |   +- net_eth1_52_54_00_8d_b0_14
  |     
  +- pci_0000_00_0a_0
      |
      +- net_eth2_52_54_00_5d_1d_74

We get expected result, so this bug has been resolved.

Attached dumpxml file of this guest for your reference.
Comment 18 Shirley Zhou 2011-02-15 03:53:08 EST
Created attachment 478796 [details]
guest dumpxml
Comment 19 Miya Chen 2011-02-24 02:51:38 EST
change status to verified based on comment#17
Comment 20 errata-xmlrpc 2011-05-23 16:20:52 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0542.html

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