Bug 681736
Summary: | Guest->Host communication stops for other ports after one port is unplugged | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | juzhang <juzhang> |
Component: | qemu-kvm | Assignee: | Amit Shah <amit.shah> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | high | Docs Contact: | |
Priority: | medium | ||
Version: | 6.1 | CC: | amit.shah, bcao, chayang, michen, mkenneth, shu, tburke, virt-maint |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | qemu-kvm-0.12.1.2-2.162.el6 | Doc Type: | Bug Fix |
Doc Text: |
After a virtio-serial port unplug, all guest to host communication for all other ports on the same virtio-serial device used to stop. This happened due to incorrectly marking to NULL the backends of the ports on the device. The fix is to not reset to NULL the backends for the device, and instead check the backends per-port.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2011-12-06 15:44:52 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: | |||
Bug Depends On: | |||
Bug Blocks: | 580954 |
Description
juzhang
2011-03-03 05:15:47 UTC
Reproduced: guest->host comm. stops, host->guest continues fine. This might be something in the guest kernel. Investigating. *** Bug 702264 has been marked as a duplicate of this bug. *** I tried with qemu-kvm-0.12.1.2-2.160.el6.x86_64, easy to reproduce with following steps: 1. launch a rhel5.7 guest with two char devices configured. ... -chardev socket,id=channel0,path=/tmp/socket0,server,nowait -chardev socket,id=channel1,path=/tmp/socket1,server,nowait ... 2. load virtio_console and acpiphp 3. hot plug two virtio-serial-pci and virtserialport, then transfer data from guest to host (qemu) device_add virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0 (qemu) device_add virtserialport,bus=virtio-serial0.0,nr=0,chardev=channel0,name=org.port0,id=port0 (qemu) device_add virtio-serial-pci,id=virtio-serial1,max_ports=16,bus=pci.0 (qemu) device_add virtserialport,bus=virtio-serial1.0,nr=1,chardev=channel1,name=org.port1,id=port1 4. hot unplug port1 (qemu) device_del port1 (qemu) device_del virtio-serial1 5. transfer data from guest to host via port0, receive data via nc. echo "aaa" > /dev/vport0p0 Actual Result: Cannot receive string "aaa" via netcat. Tried same image & steps & CLI mentioned above with qemu-kvm-0.12.1.2-2.165.el6.x86_64, cause Port number 0 on virtio-serial devices reserved for virtconsole devices for backward compatibility, so when hot plug virtserialport, change nr to any number other than 0. Actual Result: After step 5, echo "aaa" > /dev/vport0p1 in guest, received "aaa" via nc in host. Based on above, this issue has been fixed. Also tried transferring data from host to guest after step 5, it works well. Reproduced on qemu-kvm-0.12.1.2-2.160.el6.x86_64 as following steps. Reproduce Procedure: -------------------------------- 1. boot a guest. #/usr/libexec/qemu-kvm -enable-kvm -smp 4 -m 4G -name rhel6.1-64 -uuid 3f2ea5cd-3d29-48ff-aab2-23df1b6ae213 -drive file=RHEL-Server-6.1-64-virtio.qcow2,cache=none,if=none,rerror=stop,werror=stop,id=drive-virtio-disk0,format=qcow2 -device virtio-blk-pci,drive=drive-virtio-disk0,id=device-virtio-disk0 -netdev tap,script=/etc/qemu-ifup,id=netdev0 -device virtio-net-pci,netdev=netdev0,id=device-net0 -boot order=cd,menu=on -usb -device usb-tablet,id=input0 -monitor stdio -chardev socket,id=channel0,path=/var/c0,server,nowait -chardev socket,id=channel1,path=/var/c1,server,nowait -spice disable-ticketing,port=5910 2. in qemu monitor: (qemu) device_add virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0 (qemu) device_add virtserialport,bus=virtio-serial0.0,nr=1,chardev=channel0,name=org.port0,id=port0 (qemu) device_add virtio-serial-pci,id=virtio-serial1,max_ports=16,bus=pci.0 (qemu) device_add virtserialport,bus=virtio-serial1.0,nr=1,chardev=channel1,name=org.port1,id=port1 3.in host: #nc -U /var/c0 4.in guest: #echo aaa > /dev/vport0p1 5.in qemu monitor: (qemu) device_del port1 6.in guest: #echo aaa > /dev/vport0p1 Actual results: --------------------- After step 4, in host nc receives "aaa", after step 6, nc has no output. Verify this bug on qemu-kvm-0.12.1.2-2.180.el6.x86_64 as same steps above. Actual results: -------------------- After step 6, in host nc receives "aaa". Conclusion: -------------------- According to result above, this bug has been fixed. Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: After a virtio-serial port unplug, all guest to host communication for all other ports on the same virtio-serial device used to stop. This happened due to incorrectly marking to NULL the backends of the ports on the device. The fix is to not reset to NULL the backends for the device, and instead check the backends per-port. 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. http://rhn.redhat.com/errata/RHSA-2011-1531.html |