Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 646749

Summary: Reattach pci device to host which is in use by guest will make host restart
Product: Red Hat Enterprise Linux 5 Reporter: Min Zhan <mzhan>
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 5.6CC: dyuan, eblake, jdenemar, llim, mzhan, tyan, virt-maint, xen-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-10-26 10:08:12 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:

Description Min Zhan 2010-10-26 05:50:36 UTC
Description of problem:
Passthrough pci to guest, When pci works well in guest, re-attach in the host, the host will directly reboot.

Version-Release number of selected component (if applicable):
RHEL5.6-xen
kernel-xen-2.6.18-228.el5
xen-3.0.3-117.el5
kernel-2.6.18-228.el5
libvirt-0.8.2-8.el5

How reproducible:
Always

Steps to Reproduce:
1. Select a network pci device from host 
# virsh nodedev-dumpxml pci_8086_10c9_0
<device>
<name>pci_8086_10c9_0</name>
<parent>pci_8086_340a</parent>
<capability type='pci'>
<domain>0</domain>
<bus>66</bus>
<slot>0</slot>
<function>0</function>
<product id='0x10c9'>82576 Gigabit Network Connection</product>
<vendor id='0x8086'>Intel Corporation</vendor>
</capability>
</device>
2. Dettach a network pci device from host 
# virsh nodedev-dettach pci_8086_10c9_0
Device pci_8086_10c9_0 dettached # virsh nodedev-reset pci_8086_10c9_0
Device pci_8086_10c9_0 reset
3. Add this pci device info into guest xml config file
<hostdev mode='subsystem' type='pci' managed='yes'>
<source>
<address bus='66' slot='0' function='0'/>
</source>
</hostdev>
4. Run the guest 
# virsh define rhel5u4_x86_64_kvm.xml
Domain rhel5u4_x86_64_kvm defined from rhel5u4_x86_64_kvm.xml 
# virsh start rhel5u4_x86_64_kvm
Domain rhel5u4_x86_64_kvm started
The pci device works well in the guest #lspci
5. In host, try to reattach the assigned pci device 
# virsh nodedev-reattach pci_8086_10c9_0

Actual results:
Host reboot

Expected results:
it should pop up error message, such as 'device is in use'

Additional info:

In kvm, step 5 will display error message.

Comment 1 Jiri Denemark 2010-10-26 10:08:12 UTC

*** This bug has been marked as a duplicate of bug 573934 ***