Bug 1003432 - qemu-kvm should not allow different virtio serial port use the same name
qemu-kvm should not allow different virtio serial port use the same name
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev (Show other bugs)
7.0
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Amit Shah
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-01 22:39 EDT by mazhang
Modified: 2016-09-20 00:39 EDT (History)
11 users (show)

See Also:
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 04:42:36 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description mazhang 2013-09-01 22:39:59 EDT
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 02:57:53 EDT
Fix included in qemu-kvm-rhev-2.1.0-3.el7
Comment 7 langfang 2014-08-28 21:56:41 EDT
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 04:42:36 EST
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

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