Bug 727468 - Unable to attach PCI device on a booted virt guest
Summary: Unable to attach PCI device on a booted virt guest
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.1
Hardware: Unspecified
OS: Unspecified
urgent
medium
Target Milestone: rc
: ---
Assignee: Virtualization Maintenance
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 720972
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-02 08:26 UTC by RHEL Program Management
Modified: 2013-01-10 00:10 UTC (History)
12 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.160.el6_1.8
Doc Type: Bug Fix
Doc Text:
Previously, a particular device using the tg3 driver failed to be re-assigned on a running KVM guest. The Broadcom Corporation NetXtreme BCM5761 Gigabit Ethernet PCIe network controller provides a PCI-Express Cap structure that is 8 bytes shorter than it should be according the PCI-Express 2.0 specification. This fact resulted in memory corruption when it was allocated for device assignment. The code has been modified to accept the reduced size of the structure. BCM5761 can now be successfully re-assigned.
Clone Of:
Environment:
Last Closed: 2011-08-25 08:02:50 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1211 0 normal SHIPPED_LIVE qemu-kvm bug fix update 2011-08-25 08:02:31 UTC

Description RHEL Program Management 2011-08-02 08:26:47 UTC
This bug has been copied from bug #720972 and has been proposed
to be backported to 6.1 z-stream (EUS).

Comment 7 Qunfang Zhang 2011-08-16 09:47:30 UTC
Reproduced on qemu-kvm-0.12.1.2-2.160.el6_1.6 and verified pass on qemu-kvm-0.12.1.2-2.160.el6_1.8.

Steps:
0. Find a HP z800 host that have Broadcom Corporation NetXtreme BCM5764M Gigabit Ethernet with tg3 driver; add "intel_iommu=on" to the kernel command line; make sure there's at least 2 network wire in the host, one is for host another is for passthrough to guest.
1. Boot a guest without host nic device, I boot a rhel6.1-64 with virt-manager.
2. create a hostnet.xml file as following:
    <hostdev mode='subsystem' type='pci' managed='yes'>  
      <source>
        <address domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
      </source>
    </hostdev>
3.#virsh
virsh # nodedev-list --tree
.........
 +- pci_0000_00_1c_4
  |   |
  |   +- pci_0000_02_00_0
  |       |
  |       +- net_eth2_00_1f_29_03_86_03
 .........
4.virsh # detach-device pci_0000_02_00_0
5.virsh # attach-device rhel6.1-64 hostnet.xml
6.virsh # detach-device rhel6.1-64 hostnet.xml
7.Repeat step 5 and step 6.

Result:
For qemu-kvm-0.12.1.2-2.160.el6_1.6:
After step 5, failed and prompt:
error: Failed to attach device from pci-dev.xml
error: internal error unable to execute QEMU command 'closefd': File descriptor
named 'fd-hostdev0' not found

For qemu-kvm-0.12.1.2-2.160.el6_1.8:
After step 5, attach the device successfully and guest can get ip with the assigned device, network is working well.
After step 6, detach the device successfully. 

So, this issue is fixed.

Comment 9 Miroslav Svoboda 2011-08-23 15:03:23 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Previously, a particular device using the tg3 driver failed to be re-assigned on a running KVM guest. The Broadcom Corporation NetXtreme BCM5761 Gigabit Ethernet PCIe network controller provides a PCI-Express Cap structure that is 8 bytes shorter than it should be according the PCI-Express 2.0 specification. This fact resulted in memory corruption when it was allocated for device assignment. The code has been modified to accept the reduced size of the structure. BCM5761 can now be successfully re-assigned.

Comment 10 errata-xmlrpc 2011-08-25 08:02:50 UTC
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/RHBA-2011-1211.html


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