Bug 773667
Summary: | virsh attach-device fails with 'Unable to reset PCI device' for Broadcom NetExtreme II | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Miroslav Vadkerti <mvadkert> |
Component: | libvirt | Assignee: | Osier Yang <jyang> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | urgent | Docs Contact: | |
Priority: | urgent | ||
Version: | 6.2 | CC: | acathrow, ajia, berrange, dallan, dyuan, ebenes, eblake, iboverma, jpallich, jrieden, linda.knippers, mprivozn, msvoboda, mzhan, rwu, sgrubb, smueller, weizhan |
Target Milestone: | rc | Keywords: | ZStream |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-0.9.10-1.el6 | Doc Type: | Bug Fix |
Doc Text: |
Cause: libvirt has problem to check if there is active device on the same bus.
Consequence: "virsh attach-device" will fail even if the device on the same bus is already detached from host.
Fix: Fix the checking of active device on the same bus.
Result: User can attach device to guest successfully if the device(s) on the same bus are detached from host,
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2012-06-20 06:46:21 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 784785 |
Description
Miroslav Vadkerti
2012-01-12 14:27:59 UTC
One option might be to detach the other conflicting, but unused, device from the host drivers, eg 'virsh nodev-detach', which should then let hotplug work for that device. Alternatively, you have to coldplug all the devices to the VM at the same time when first starting it up Don, do you have any thoughts on what might be conflicting here? https://www.redhat.com/archives/libvir-list/2012-January/msg00535.html Patch posted to upstream. commit 6be610bfaae08655eaf93f9638d4c6636c00343f Author: Osier Yang <jyang> Date: Wed Jan 18 04:02:05 2012 +0800 qemu: Introduce inactive PCI device list pciTrySecondaryBusReset checks if there is active device on the same bus, however, qemu driver doesn't maintain an effective list for the inactive devices, and it passes meaningless argument for parameter "inactiveDevs". e.g. (qemuPrepareHostdevPCIDevices) It seems I still met a similar error with Comment 4, Miroslav, could you try it again using above new build? thanks. I've moved the BZ back to assigned. In fact, i don't think this will ever work in this way. This NetExtreme card does not play very nice with virtualization. One one hand, a since PCI card adds 2 PCI devices onto slot (each with different PCI function number). But on the other hand, it completely lacks FLReset; Therefore if one wants to add the first PCI device, he has to 'virsh nodedev-detach' the second one and vice versa in order to allow secondary bus reset. So Miroslav, what you need to do, is: virsh nodedev-dettach pci_0000_04_00_0 prior to virsh attach-device guest1 pci_dev.xml So I am suggesting to move this back to POST. Miroslav, can you confirm it is working for you? (In reply to comment #22) > In fact, i don't think this will ever work in this way. This NetExtreme card > does not play very nice with virtualization. One one hand, a since PCI card > adds 2 PCI devices onto slot (each with different PCI function number). But on > the other hand, it completely lacks FLReset; Therefore if one wants to add the > first PCI device, he has to 'virsh nodedev-detach' the second one and vice > versa in order to allow secondary bus reset. > > So Miroslav, what you need to do, is: > > virsh nodedev-dettach pci_0000_04_00_0 > > prior to virsh attach-device guest1 pci_dev.xml > So I am suggesting to move this back to POST. Miroslav, can you confirm it is > working for you? Exactly,you need to detach the PCI device which shares the same bus from host firstly, it's my fault to not clarify this in the commit message. (In reply to comment #27) > (In reply to comment #22) > > In fact, i don't think this will ever work in this way. This NetExtreme card > > does not play very nice with virtualization. One one hand, a since PCI card > > adds 2 PCI devices onto slot (each with different PCI function number). But on > > the other hand, it completely lacks FLReset; Therefore if one wants to add the > > first PCI device, he has to 'virsh nodedev-detach' the second one and vice > > versa in order to allow secondary bus reset. > > > > So Miroslav, what you need to do, is: > > > > virsh nodedev-dettach pci_0000_04_00_0 > > > > prior to virsh attach-device guest1 pci_dev.xml > > So I am suggesting to move this back to POST. Miroslav, can you confirm it is > > working for you? > > Exactly,you need to detach the PCI device which shares the same bus from host > firstly, it's my fault to not clarify this in the commit message. And I will add Tech Notes for this bug once it's VERIFIED. The bug has been verified on libvirt-0.9.10-1.el6.x86_64 according to steps of Comment 23. 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, when libvirt tried to attach certain SR-IOV (Single Root I/O Virtualization) devices to virtual guests, this attempts failed with the "Unable to reset PCI device" error messages. This patch modifies the underlying code so that these PCI devices can now be successfully attached to guests. I thought this problem had to do with non-SR-IOV devices. When I tested the fix for Miroslav Vadkerti, it was with a 4-port Broadcom NIC, not a SR-IOV device. Linda is right, Miroslav we need to fix the documentation here. I would just maybe dorop the SR-IOV mentioning in favor of PCI device. (In reply to comment #38) > Linda is right, Miroslav we need to fix the documentation here. I would just > maybe dorop the SR-IOV mentioning in favor of PCI device. Hi, Miroslav, I updated the tech note with CCFR format (without mentioning SR-IOV) Osier Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1 +1,4 @@ -Previously, when libvirt tried to attach certain SR-IOV (Single Root I/O Virtualization) devices to virtual guests, this attempts failed with the "Unable to reset PCI device" error messages. This patch modifies the underlying code so that these PCI devices can now be successfully attached to guests.+Cause: libvirt has problem to check if there is active device on the same bus. +Consequence: "virsh attach-device" will fail even if the device on the same bus is already detached from host. +Fix: Fix the checking of active device on the same bus. +Result: User can attach device to guest successfully if the device(s) on the same bus are detached from host, 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. http://rhn.redhat.com/errata/RHSA-2012-0748.html |