Bug 625949 - pci hotplug of e1000, rtl8139 nic device fails for all guests
pci hotplug of e1000, rtl8139 nic device fails for all guests
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
7.0
All Linux
low Severity medium
: rc
: 7.0
Assigned To: Alex Williamson
Virtualization Bugs
:
Depends On:
Blocks: 580953
  Show dependency treegraph
 
Reported: 2010-08-20 18:10 EDT by Alex Williamson
Modified: 2014-06-17 23:11 EDT (History)
10 users (show)

See Also:
Fixed In Version: 1.4.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-13 05:38:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Alex Williamson 2010-08-20 18:10:26 EDT
Description of problem:
The fix for bz607611 is fine, but upstream took a different approach.  Update to match for 6.1

Version-Release number of selected component (if applicable):
rhel6

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Thread - http://lists.nongnu.org/archive/html/qemu-devel/2010-08/msg00186.html

Likely resulting upstream patch - http://lists.nongnu.org/archive/html/qemu-devel/2010-08/msg01058.html
Comment 2 Amit Shah 2010-10-11 08:05:04 EDT
Clickable link to orig. bug: Bug 607611.

Note for QE: after this bug is fixed, device hot-unplug should continue to work.
Comment 8 Paolo Bonzini 2013-03-15 08:13:29 EDT
Step followed to recreate the issue:
1)started the guest with net "user" interface
/usr/libexec/qemu-kvm -drive file=/root/sdb/images/win7-32.qcow2 -smp 2 
-m 6144 --monitor stdio -netdev user,id=kuser -device e1000,netdev=kuser 
-vnc :10

2)Hotplugged a "e1000" card using the commands below
(qemu) netdev_add tap,id=tap2,script=br
(qemu) device_add e1000,netdev=tap2

the bug occurs with both windows and linux(rhel6), both 32 and 64 bit

The e1000 state isn't getting setup correctly because the reset function isn't getting called on a hotplug.

Seems to be fixed upstream, device_set_realized has:

        if (dev->hotplugged && local_err == NULL) {
            device_reset(dev);
        }
Comment 11 huiqingding 2014-01-24 04:12:14 EST
Verify this bug using the following version:
qemu-kvm-debuginfo-1.5.3-41.el7.x86_64
kernel-3.10.0-67.el7.x86_64

I test four guest: RHEL7 (64-bits), RHEL6.5 (32 bits), Win2012R2 and Win8 (32 bits). The hotplug of e1000/rtl8139 nic to these fours guests are all successful.

Steps of verification:
1. boot a guest
# /usr/libexec/qemu-kvm -M pc -cpu SandyBridge -enable-kvm -m 2048 -smp 2,sockets=1,cores=2,threads=1 -name rhel7 -uuid 6afa5f93-2d4f-420f-81c6-e5fdddbd1c83 -drive file=/home/^Cf=none,id=drive-virtio-disk0,format=qcow2,serial=40c061dd-5d60-4fc5-865f-55db700407f0,werror=stop,rerror=stop,aio=threads -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0  -vnc :3  -monitor stdio -vga std  -net none -qmp tcp:0:4444,nowait,server
2. hotplug a e1000 nic
{ "execute": "netdev_add", "arguments": { "type":"tap","id":"hostnet0"}}
{"execute": "device_add", "arguments": { "driver":"e1000","netdev":"hostnet0","mac":"22:11:22:45:61:97","id": "net0"}}
3. hotplug a rtl8139 nic
{ "execute": "netdev_add", "arguments": { "type":"tap","id":"hostnet1"}}
{"execute": "device_add", "arguments": { "driver":"rtl8139","netdev":"hostnet1","mac":"22:11:22:45:61:00","id": "net1"}}

Actual results
1. after step2, use hmp command to check network
(qemu) info network
net0: index=0,type=nic,model=e1000,macaddr=22:11:22:45:61:97
 \ hostnet0: index=0,type=tap,ifname=tap0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown
In linux guest, lscpi can find this e1000 nic card.
In windows guest, check "Device Manager" and can find e1000 nic card
guest can ping other external host.

2. after step3, use hmp command to check network
(qemu) info network
net0: index=0,type=nic,model=e1000,macaddr=22:11:22:45:61:97
 \ hostnet0: index=0,type=tap,ifname=tap0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown
net1: index=0,type=nic,model=rtl8139,macaddr=22:11:22:45:61:00
 \ hostnet1: index=0,type=tap,ifname=tap1,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown
In linux guest, lscpi can find this rtl8139 nic card.
In windows guest, check "Device Manager" and can find rtl8139 nic card.
guest can ping other external host.

Based on the above results, I think this bug has been fixed.
Comment 12 huiqingding 2014-01-24 04:34:07 EST
(In reply to huiqingding from comment #11)
> Verify this bug using the following version:
> qemu-kvm-debuginfo-1.5.3-41.el7.x86_64

Sorry, the qemu-kvm version is: qemu-img-1.5.3-41.el7.x86_64
Comment 14 Ludek Smid 2014-06-13 05:38:57 EDT
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

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