Bug 573934 - can reattach pci device to host while it is using by guest
Summary: can reattach pci device to host while it is using by guest
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: libvirt
Version: 5.5
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Daniel Veillard
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 646749 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-03-16 08:52 UTC by zhanghaiyan
Modified: 2011-01-31 21:51 UTC (History)
7 users (show)

Fixed In Version: libvirt-0.8.2-5.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-01-31 21:51:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description zhanghaiyan 2010-03-16 08:52:57 UTC
Description of problem:
can reattach pci device to host while it is using by guest

Version-Release number of selected component (if applicable):
- kernel-xen-2.6.18-192.el5.x86_64.rpm   
- xen-3.0.3-105.el5.x86_64.rpm  
- xen-libs-3.0.3-105.el5.i386.rpm   
- libvirt-0.6.3-33.el5.x86_64.rpm  


How reproducible:
100%

Steps to Reproduce:
1. Detach VF/PF pci device from host, 
   # virsh nodedev-dettach pci_8086_10ca
2. Hotplug VF/PF pci device to running guest
   # virsh attach-device <guestname> <VF/PF>.xml
3. In guest, could see the VF/PF by #lspci 
4. on host, # virsh nodedev-reattach pci_8086_10ca
    # vish nodedev-reset pci_8086_10ca

  
Actual results:
reattach and reset pass

Expected results:
reset should fail and pops up a dialog saying 'cannot reset active deivce'

Additional info:
This bug cannot be reproduced on kvm system

Comment 1 Jiri Denemark 2010-09-02 11:59:02 UTC
Fixed in libvirt-0.8.2-1.el5

Comment 3 Eric Blake 2010-09-13 22:32:29 UTC
Back to POST until this patch is included (it missed 0.8.2-4.el5):
http://post-office.corp.redhat.com/archives/rhvirt-patches/2010-September/msg00296.html

Comment 4 Jiri Denemark 2010-09-21 15:54:08 UTC
Fix built in libvirt-0.8.2-5.el5

Comment 6 Johnny Liu 2010-10-19 04:38:57 UTC
Re-test this bug with libvirt-0.8.2-7.el5 on RHEL5u6 Server X86_64 Xen, but failed.

kernel-xen-2.6.18-227.el5
xen-libs-3.0.3-117.el5
xen-3.0.3-117.el5
libvirt-0.8.2-7.el5

1. Enable vt-d for xen kernel
add "iommu=1" to kernel line
2. Start a guest, and load acpiphp module in guest.
3. Detach pci NIC device from host
# virsh nodedev-dettach pci_8086_10de
# virsh nodedev-reset pci_8086_10de
4.Hotplug the pci device to running guest
# cat pci-device.xml
      <hostdev mode='subsystem' type='pci'>
      <source>
      <address domain='0x0000' bus='0x00' slot='0x19' function='0x0'/>
      </source>
      </hostdev>
#virsh attach-device <guestname> pci-device.xml
5. On host, try to re-attach the device to host when the device is using
# virsh nodedev-reattach pci_8086_10de

Then host will reboot

Comment 7 Jiri Denemark 2010-10-26 10:08:12 UTC
*** Bug 646749 has been marked as a duplicate of this bug. ***

Comment 10 RHEL Program Management 2011-01-11 19:59:16 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. 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.

Comment 11 RHEL Program Management 2011-01-11 22:59:32 UTC
This request was erroneously denied for the current release of
Red Hat Enterprise Linux.  The error has been fixed and this
request has been re-proposed for the current release.


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