All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/1] virtio-serial: propagate guest_connected to the port on post_load
@ 2013-03-24 13:02 Hans de Goede
  2013-03-24 13:02 ` [Qemu-devel] [PATCH] " Hans de Goede
  0 siblings, 1 reply; 2+ messages in thread
From: Hans de Goede @ 2013-03-24 13:02 UTC (permalink / raw)
  To: Amit Shah; +Cc: Hans de Goede, qemu-devel

Here is a new attempt on fixing the spicevmc needing the guest_connected
value post-migration, as discussed in various other threads.

Note this patch applies on top of my frontend-open handling cleanup series I
just posted.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>

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

* [Qemu-devel] [PATCH] virtio-serial: propagate guest_connected to the port on post_load
  2013-03-24 13:02 [Qemu-devel] [PATCH 0/1] virtio-serial: propagate guest_connected to the port on post_load Hans de Goede
@ 2013-03-24 13:02 ` Hans de Goede
  0 siblings, 0 replies; 2+ messages in thread
From: Hans de Goede @ 2013-03-24 13:02 UTC (permalink / raw)
  To: Amit Shah; +Cc: Hans de Goede, Alon Levy, qemu-devel

From: Alon Levy <alevy@redhat.com>

When migrating a host with with a spice agent running the mouse becomes
non operational after the migration due to the agent state being
inconsistent between the guest and the client.

After migration the spicevmc backend on the destination has never been notified
of the (non 0) guest_connected state. Virtio-serial holds this state
information and migrates it, this patch properly propagates this information
to virtio-console and through that to interested chardev backends.

rhbz #725965

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 hw/virtio-serial-bus.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c
index eb7af21..a9cb114 100644
--- a/hw/virtio-serial-bus.c
+++ b/hw/virtio-serial-bus.c
@@ -579,6 +579,7 @@ static void virtio_serial_post_load_timer_cb(void *opaque)
     VirtIOSerial *s = opaque;
     VirtIOSerialPort *port;
     uint8_t host_connected;
+    VirtIOSerialPortClass *vsc;
 
     if (!s->post_load) {
         return;
@@ -594,6 +595,10 @@ static void virtio_serial_post_load_timer_cb(void *opaque)
             send_control_event(s, port->id, VIRTIO_CONSOLE_PORT_OPEN,
                                port->host_connected);
         }
+        vsc = VIRTIO_SERIAL_PORT_GET_CLASS(port);
+        if (vsc->set_guest_connected) {
+            vsc->set_guest_connected(port, port->guest_connected);
+        }
     }
     g_free(s->post_load->connected);
     qemu_free_timer(s->post_load->timer);
-- 
1.8.1.4

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

end of thread, other threads:[~2013-03-24 12:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-24 13:02 [Qemu-devel] [PATCH 0/1] virtio-serial: propagate guest_connected to the port on post_load Hans de Goede
2013-03-24 13:02 ` [Qemu-devel] [PATCH] " Hans de Goede

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.