All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] virtio-serial-bus: replay guest_open on migration
@ 2011-07-26 13:03 Alon Levy
  2011-07-27  5:45 ` Markus Armbruster
  0 siblings, 1 reply; 13+ messages in thread
From: Alon Levy @ 2011-07-26 13:03 UTC (permalink / raw)
  To: qemu-devel; +Cc: amit.shah, hdegoede, yhalperi, armbru, quintela

Signed-off-by: Alon Levy <alevy@redhat.com>
---
 hw/virtio-serial-bus.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c
index c5eb931..7a652ff 100644
--- a/hw/virtio-serial-bus.c
+++ b/hw/virtio-serial-bus.c
@@ -618,14 +618,20 @@ static int virtio_serial_load(QEMUFile *f, void *opaque, int version_id)
     for (i = 0; i < nr_active_ports; i++) {
         uint32_t id;
         bool host_connected;
+        VirtIOSerialPortInfo *info;
 
         id = qemu_get_be32(f);
         port = find_port_by_id(s, id);
         if (!port) {
             return -EINVAL;
         }
-
         port->guest_connected = qemu_get_byte(f);
+        info = DO_UPCAST(VirtIOSerialPortInfo, qdev, port->dev.info);
+        if (port->guest_connected && info->guest_open) {
+            /* replay guest open */
+            info->guest_open(port);
+
+        }
         host_connected = qemu_get_byte(f);
         if (host_connected != port->host_connected) {
             /*
-- 
1.7.6

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2011-07-27 15:33 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-26 13:03 [Qemu-devel] [PATCH] virtio-serial-bus: replay guest_open on migration Alon Levy
2011-07-27  5:45 ` Markus Armbruster
2011-07-27  7:07   ` Alon Levy
2011-07-27  9:21     ` Markus Armbruster
2011-07-27 10:20     ` Amit Shah
2011-07-27 11:09       ` Alon Levy
2011-07-27 12:05         ` Amit Shah
2011-07-27 12:27           ` Alon Levy
2011-07-27 14:02             ` Markus Armbruster
2011-07-27 14:16     ` Anthony Liguori
2011-07-27 14:49       ` Alon Levy
2011-07-27 15:01         ` Anthony Liguori
2011-07-27 15:32           ` Alon Levy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.