RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 612008 - Reattach NIC to host lead to host reboot
Summary: Reattach NIC to host lead to host reboot
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel
Version: 6.0
Hardware: All
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: Don Dutile (Red Hat)
QA Contact: Red Hat Kernel QE team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-07 02:32 UTC by juzhang
Modified: 2010-10-11 14:01 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-10-11 14:01:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description juzhang 2010-07-07 02:32:04 UTC
Description of problem:
First attach physical pass-though guest(vm), then reattach NIC to host lead to host reboot.

Version-Release number of selected component (if applicable):
#rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.90.el6.x86_64
#uname -r
2.6.32-37.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Unbind device from host kernel driver (PCI device 28:00.0)
1.1 lspci | grep Ethernet
lspci | grep Ethernet
01:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5764M Gigabit
Ethernet PCIe (rev 10)
03:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection
(rev 01)
03:00.1 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection
(rev 01)
28:00.0 Ethernet controller: Intel Corporation 82572EI Gigabit Ethernet
Controller (Copper) (rev 06)
1.2. #lspci -n | grep 28:00.0
28:00.0 0200: 8086:10b9 (rev 06)
1.3 echo "8086 10b9" >/sys/bus/pci/drivers/pci-stub/new_id
1.4 echo 0000:28:00.0 >/sys/bus/pci/devices/0000\:28\:00.0/driver/unbind
1.5 echo 0000:28:00.0 >/sys/bus/pci/drivers/pci-stub/bind
2.boot guest
#/usr/libexec/qemu-kvm -m 4G -smp 4 -drive
file=/root/zhangjunyi/rhel6.32.raw,if=none,id=drive-virtio-disk0,boot=on,cache=none,format=raw
-device virtio-blk-pci,bus=pci.0,drive=drive-virtio-disk0,id=virtio-disk0
-netdev tap,id=hostnet0,vhost=on -device
virtio-net-pci,netdev=hostnet0,id=net0,mac=22:11:22:45:66:97 -device
virtio-balloon-pci -cpu qemu64,+sse2,+x2apic -monitor stdio -vnc :10 -qmp
tcp:0:4445,server,nowait -drive
file=/root/zhangjunyi/boot.iso,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw
-device ide-drive,drive=drive-ide0-1-0 -boot c

3. hot-plug pass-through device
(qemu) device_add pci-assign,host=28:00.0,id=zjy
4.after step3, device was hot-plug successful.
(qemu) info pc
 Bus  0, device   0, function 0:
    Host bridge: PCI device 8086:1237
      id ""
  Bus  0, device   1, function 0:
    ISA bridge: PCI device 8086:7000
      id ""
  Bus  0, device   1, function 1:
    IDE controller: PCI device 8086:7010
      BAR4: I/O at 0xc000 [0xc00f].
      id ""
  Bus  0, device   1, function 3:
    Bridge: PCI device 8086:7113
      IRQ 9.
      id ""
  Bus  0, device   2, function 0:
    VGA controller: PCI device 1013:00b8
      BAR0: 32 bit prefetchable memory at 0xf0000000 [0xf1ffffff].
      BAR1: 32 bit memory at 0xf2000000 [0xf2000fff].
      BAR6: 32 bit memory at 0xffffffffffffffff [0x0000fffe].
      id ""
  Bus  0, device   3, function 0:
    SCSI controller: PCI device 1af4:1001
      IRQ 11.
      BAR0: I/O at 0xc040 [0xc07f].
      BAR1: 32 bit memory at 0xf2020000 [0xf2020fff].
      id "virtio-disk0"
  Bus  0, device   4, function 0:
    Ethernet controller: PCI device 1af4:1000
      IRQ 11.
      BAR0: I/O at 0xc080 [0xc09f].
      BAR1: 32 bit memory at 0xf2021000 [0xf2021fff].
      BAR6: 32 bit memory at 0xffffffffffffffff [0x0000fffe].
      id "net0"
  Bus  0, device   5, function 0:
    RAM controller: PCI device 1af4:1002
      IRQ 10.
      BAR0: I/O at 0xc0a0 [0xc0bf].
      id ""
  Bus  0, device   6, function 0:
    Ethernet controller: PCI device 8086:10b9
      IRQ 3.
      BAR0: 32 bit memory at 0xe0000000 [0xe001ffff].
      BAR1: 32 bit memory at 0xe0020000 [0xe003ffff].
      BAR2: I/O at 0x1000 [0x101f].
      BAR6: 32 bit prefetchable memory at 0xffffffffffffffff [0x0001fffe].
      id "zjy"
5.In host,Reset device to host kernel driver
#echo "8086 10b9" > /sys/bus/pci/devices/0000\:28\:00.0/driver/new_id
#echo 0000:28:00.0 > /sys/bus/pci/drivers/pci-stub/unbind
#echo 0000:28:00.0 > /sys/bus/pci/drivers/e1000e/bind
-bash: echo: write error: No such device
6.Hot plug-out physical NIC card 
(qemu) device_del zjy
7.After step6,physical was hot-plug out successful
8.In host,Reset device to host kernel driver again
#echo 0000:28:00.0 > /sys/bus/pci/drivers/e1000e/bind

Actual results:
After step8,host rebooted without any hints and  failed to boot up.


Expected results:
Anyway,can't cause host reboot.

Additional info:
Reattach NIC to host successful if do the following steps:
1.boot guest
#/usr/libexec/qemu-kvm -m 4G -smp 4 -drive
file=/root/zhangjunyi/rhel6.32.raw,if=none,id=drive-virtio-disk0,boot=on,cache=none,format=raw
-device virtio-blk-pci,bus=pci.0,drive=drive-virtio-disk0,id=virtio-disk0
-netdev tap,id=hostnet0,vhost=on -device
virtio-net-pci,netdev=hostnet0,id=net0,mac=22:11:22:45:66:97 -device
virtio-balloon-pci -cpu qemu64,+sse2,+x2apic -monitor stdio -vnc :10 -qmp
tcp:0:4445,server,nowait -drive
file=/root/zhangjunyi/boot.iso,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw
-device ide-drive,drive=drive-ide0-1-0 -boot c
2. hot-plug pass-through device
(qemu) device_add pci-assign,host=28:00.0,id=zjy
3.after step2, device was hot-plug successful.
(qemu) info pci
 Bus  0, device   0, function 0:
    Host bridge: PCI device 8086:1237
      id ""
  Bus  0, device   1, function 0:
    ISA bridge: PCI device 8086:7000
      id ""
  Bus  0, device   1, function 1:
    IDE controller: PCI device 8086:7010
      BAR4: I/O at 0xc000 [0xc00f].
      id ""
  Bus  0, device   1, function 3:
    Bridge: PCI device 8086:7113
      IRQ 9.
      id ""
  Bus  0, device   2, function 0:
    VGA controller: PCI device 1013:00b8
      BAR0: 32 bit prefetchable memory at 0xf0000000 [0xf1ffffff].
      BAR1: 32 bit memory at 0xf2000000 [0xf2000fff].
      BAR6: 32 bit memory at 0xffffffffffffffff [0x0000fffe].
      id ""
  Bus  0, device   3, function 0:
    SCSI controller: PCI device 1af4:1001
      IRQ 11.
      BAR0: I/O at 0xc040 [0xc07f].
      BAR1: 32 bit memory at 0xf2020000 [0xf2020fff].
      id "virtio-disk0"
  Bus  0, device   4, function 0:
    Ethernet controller: PCI device 1af4:1000
      IRQ 11.
      BAR0: I/O at 0xc080 [0xc09f].
      BAR1: 32 bit memory at 0xf2021000 [0xf2021fff].
      BAR6: 32 bit memory at 0xffffffffffffffff [0x0000fffe].
      id "net0"
  Bus  0, device   5, function 0:
    RAM controller: PCI device 1af4:1002
      IRQ 10.
      BAR0: I/O at 0xc0a0 [0xc0bf].
      id ""
  Bus  0, device   6, function 0:
    Ethernet controller: PCI device 8086:10b9
      IRQ 3.
      BAR0: 32 bit memory at 0xe0000000 [0xe001ffff].
      BAR1: 32 bit memory at 0xe0020000 [0xe003ffff].
      BAR2: I/O at 0x1000 [0x101f].
      BAR6: 32 bit prefetchable memory at 0xffffffffffffffff [0x0001fffe].
      id "zjy"
4.Hot plug-out physical NIC card 
(qemu) device_del zjy
5.After step4,physical was hot-plug out successful
6.In host,Reset device to host kernel driver
#echo "8086 10b9" > /sys/bus/pci/devices/0000\:28\:00.0/driver/new_id
#echo 0000:28:00.0 > /sys/bus/pci/drivers/pci-stub/unbind
#echo 0000:28:00.0 > /sys/bus/pci/drivers/e1000e/bind

Comment 2 RHEL Program Management 2010-07-15 15:17:02 UTC
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release. It has
been denied for the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **


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