Bug 1003432

Summary: qemu-kvm should not allow different virtio serial port use the same name
Product: Red Hat Enterprise Linux 7 Reporter: mazhang <mazhang>
Component: qemu-kvm-rhevAssignee: Amit Shah <amit.shah>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: bsarathy, chayang, flang, hhuang, juzhang, mdeng, michen, mkenneth, qzhang, rbalakri, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-rhev-2.1.0-3.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 09:42:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description mazhang 2013-09-02 02:39:59 UTC
Description of problem:
windows guest use the name transfer data, but qemu-kvm now can boot up different virtio serial port use the same name.

Version-Release number of selected component (if applicable):
host:RHEL6.5-20130820.2
qemu-kvm-0.12.1.2-2.398.el6.x86_64
kernel-2.6.32-414.el6.x86_64

guest:
win7-64
virtio-win-prewhql-0.1-68

How reproducible:
100%

Steps to Reproduce:
1. try boot up guest with two virtio serial port use the same name
...
-device virtio-serial-pci,id=virtio-serial0,max_ports=16 \
-chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait \
-device virtserialport,chardev=channel1,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port1 \
-chardev socket,id=channel2,path=/tmp/helloworld2,server,nowait \
-device virtserialport,chardev=channel2,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port2 \

2.
3.

Actual results:
can boot up guest
(qemu)info qtree
...
bus: virtio-serial0.0
          type virtio-serial-bus
          dev: virtserialport, id "port2"
            dev-prop: chardev = channel2
            bus-prop: nr = 2
            bus-prop: name = "com.redhat.rhevm.vdsm"
             dev-prop-int: id: 2
             dev-prop-int: guest_connected: 0
             dev-prop-int: host_connected: 0
             dev-prop-int: throttled: 0
          dev: virtserialport, id "port1"
            dev-prop: chardev = channel1
            bus-prop: nr = 1
            bus-prop: name = "com.redhat.rhevm.vdsm"
             dev-prop-int: id: 1
             dev-prop-int: guest_connected: 0
             dev-prop-int: host_connected: 0
             dev-prop-int: throttled: 0
...

Expected results:
qemu-kvm quit with warning, like boot up devices use the same id.

Additional info:

Comment 6 Miroslav Rezanina 2014-08-28 06:57:53 UTC
Fix included in qemu-kvm-rhev-2.1.0-3.el7

Comment 7 langfang 2014-08-29 01:56:41 UTC
Reproduce this bug as follow version:
Host:
# uname -r 
3.10.0-144.el7.x86_64
# rpm -q qemu-kvm-rhev
qemu-kvm-rhev-1.5.3-60.el7_0_0.6.x86_64

Steps:
1.Boot guest with two virtio serial port use the same name
...
-device virtio-serial-pci,id=virtio-serial0,max_ports=16 \
-chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait \
-device virtserialport,chardev=channel1,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port1 \
-chardev socket,id=channel2,path=/tmp/helloworld2,server,nowait \
-device virtserialport,chardev=channel2,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port2 \

Results:
Guest can boot up

Verify this bug as follow version:
Host:
# uname -r 
3.10.0-144.el7.x86_64
# rpm -q qemu-kvm-rhev
qemu-kvm-rhev-2.1.0-3.el7.x86_64


Steps as same as reproduce

Results:
QEMU 2.1.0 monitor - type 'help' for more information
(qemu) qemu-kvm: -device virtserialport,chardev=channel2,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port2: virtio-serial-bus: A port already exists by name com.redhat.rhevm.vdsm
qemu-kvm: -device virtserialport,chardev=channel2,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port2: Device 'virtserialport' could not be initialized

According to above test ,this bug has been fixed.

Comment 11 errata-xmlrpc 2015-03-05 09:42:36 UTC
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.

https://rhn.redhat.com/errata/RHSA-2015-0624.html