]> git.proxmox.com Git - qemu.git/commit
virtio-serial-bus: fix guest_connected init before driver init
authorAlon Levy <alevy@redhat.com>
Mon, 23 Apr 2012 15:23:10 +0000 (18:23 +0300)
committerAmit Shah <amit.shah@redhat.com>
Wed, 25 Apr 2012 11:04:02 +0000 (16:34 +0530)
commit62a9fbf7fd022103c6b271abd7b7834b84ba7071
treea0eab471ea5fe03939f474e3d2ec5a5a51ed7f05
parent3c30dd5a68e9fee6af67cfd0d14ed7520820f36a
virtio-serial-bus: fix guest_connected init before driver init

guest_connected should be false before guest driver initialization, and
true after, both for multiport aware and non multiport aware drivers.

Don't set it before the guest_features are available; instead use
set_status which is called by io to VIRTIO_PCI_STATUS with
VIRTIO_CONFIG_S_DRIVER_OK by even older non multiport drivers.

[Amit: Add comment, tweak summary, only set guest_connected and not
       reset it as a side-effect.]

Signed-off-by: Alon Levy <alevy@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
hw/virtio-serial-bus.c