]> Git Repo - qemu.git/commit
virtio-serial-bus: keep port 0 reserved for virtconsole even on unplug
authorAmit Shah <[email protected]>
Mon, 14 Jul 2014 11:21:56 +0000 (16:51 +0530)
committerAmit Shah <[email protected]>
Wed, 16 Jul 2014 09:02:40 +0000 (14:32 +0530)
commit57d84cf35302fe51789c18354bf09a521bb603df
treea43ebde072dc408b8dbfe0b07f6a58dfb4afcb11
parent5a7348045091a2bc15d85bb177e5956aa6114e5a
virtio-serial-bus: keep port 0 reserved for virtconsole even on unplug

We keep port 0 reserved for compat with older guests, where only
virtio-console was expected.  Even if a system is started without a
virtio-console port, port #0 is kept aside.  However, after a
virtconsole port is unplugged, port id 0 became available, and the next
hotplug of a virtserialport caused failure due to it not being a console
port.

Steps to reproduce:

$ ./x86_64-softmmu/qemu-system-x86_64 -m 512 -cpu host -enable-kvm -device virtio-serial-pci -monitor stdio  -vnc :1
QEMU 2.0.91 monitor - type 'help' for more information
(qemu) device_add virtconsole,id=p1
(qemu) device_del p1
(qemu) device_add virtserialport,id=p1
Port number 0 on virtio-serial devices reserved for virtconsole devices for backward compatibility.
Device 'virtserialport' could not be initialized
(qemu) quit

Reported-by: dengmin <[email protected]>
Reviewed-by: Amos Kong <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Signed-off-by: Amit Shah <[email protected]>
hw/char/virtio-serial-bus.c
This page took 0.025936 seconds and 4 git commands to generate.