Red Hat Bugzilla – Bug 603039
Reattach a pci device which is using by guest to host output wrong info
Last modified: 2011-12-06 05:44:27 EST
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
Since RHEL 6.1 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as an
exception or blocker.
Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.
Verified this with with ：
Steps to Reproduce:
1. Select a network pci device from host
# virsh nodedev-dumpxml pci_0000_00_19_0
<product id='0x10de'>82567LM-3 Gigabit Network Connection</product>
<vendor id='0x8086'>Intel Corporation</vendor>
2. Dettach a network pci device from host
# virsh nodedev-dettach pci_0000_00_19_0
Device pci_0000_00_19_0 dettached
# virsh nodedev-reset pci_0000_00_19_0
3. Add this pci device info into guest xml config file
<hostdev mode='subsystem' type='pci'>
<address bus='0' slot='25' function='0'/>
4. Run the guest
# virsh define dom.xml
# virsh start dom
Domain dom started
#virsh dumpxml dom
<hostdev mode='subsystem' type='pci' managed='no'>
<address domain='0x0000' bus='0x00' slot='0x19' function='0x0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
5. In guest
00:06.0 Ethernet controller:Intel Corporation 82567LM-3 Gigabit network Connection (rev 02)
The pci device works well in the guest
6. In host, try to reattach the assigned pci device
# virsh nodedev-reattach pci_0000_00_19_0
error: Failed to re-attach device pci_0000_00_19_0
error: internal error Not reattaching active device 0000:00:19.0
7.# readlink /sys/bus/pci/devices/0000\:00\:19.0/driver/
8. # virsh destroy dom
shutdown the guest and remove the pci device from guest
9. # virsh nodedev-reattach pci_0000_00_19_0
Device pci_0000_00_19_0 re-attached
10. # virsh nodedev-reset pci_0000_00_19_0
Device pci_0000_00_19_0 reset
11. # readlink /sys/bus/pci/devices/0000\:00\:19.0/driver
At step 6,it pops up error message and cannot reattach the pci device,and also the device works well in guest.
So change the bug status to VERIFIED.
(In reply to comment #10)
> Verified this with with ：
> Steps to Reproduce:
> 1. Select a network pci device from host
> # virsh nodedev-dumpxml pci_0000_00_19_0
Tiny update of the steps:
For the kernel -172, should run the following commands before start domain:
1.modprove -r kvm
2.modprobe kvm allow_unsafe_assigned_interrupts=1"
For the kernel -169, domain start successfully without "allow_unsafe_assigned_interrupts=1".
> # virsh start dom
> Domain dom started
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.