[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] hw/virtio-serial-bus: replay guest open on destinat
From: |
Alon Levy |
Subject: |
[Qemu-devel] [PATCH] hw/virtio-serial-bus: replay guest open on destination |
Date: |
Sun, 25 Nov 2012 15:39:14 +0200 |
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 if the client is using
semi-seamless or switch host migration.
After migration the target client has never received the guest_open
initiated spice message. Virtio-serial holds this state information and
migrates it, so replay that over the chardev post migration. Fix is not
spice specific but spice is the only client that cares about it.
rhbz #725965.
---
hw/virtio-serial-bus.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c
index efa8a81..ccce1fa 100644
--- a/hw/virtio-serial-bus.c
+++ b/hw/virtio-serial-bus.c
@@ -641,6 +641,7 @@ static void virtio_serial_post_load_timer_cb(void *opaque)
VirtIOSerial *s = opaque;
VirtIOSerialPort *port;
uint8_t host_connected;
+ VirtIOSerialPortClass *vsc;
for (i = 0 ; i < s->post_load.nr_active_ports; ++i) {
port = s->post_load.connected[i].port;
@@ -653,6 +654,11 @@ static void virtio_serial_post_load_timer_cb(void *opaque)
send_control_event(port, VIRTIO_CONSOLE_PORT_OPEN,
port->host_connected);
}
+ vsc = VIRTIO_SERIAL_PORT_GET_CLASS(port);
+ if (port->guest_connected && vsc->guest_open) {
+ /* replay guest open */
+ vsc->guest_open(port);
+ }
}
g_free(s->post_load.connected);
s->post_load.connected = NULL;
--
1.8.0
- [Qemu-devel] [PATCH] hw/virtio-serial-bus: replay guest open on destination,
Alon Levy <=
- Re: [Qemu-devel] [PATCH] hw/virtio-serial-bus: replay guest open on destination, Amit Shah, 2012/11/27
- Re: [Qemu-devel] [PATCH] hw/virtio-serial-bus: replay guest open on destination, Markus Armbruster, 2012/11/27
- Re: [Qemu-devel] [PATCH] hw/virtio-serial-bus: replay guest open on destination, Anthony Liguori, 2012/11/27
- [Qemu-devel] [PATCH 1/3] virtio-serial: add virtio_serial_guest_connected, Alon Levy, 2012/11/28
- [Qemu-devel] [PATCH 3/3] spice-qemu-char: register interface on post load, Alon Levy, 2012/11/28
- Re: [Qemu-devel] [PATCH 3/3] spice-qemu-char: register interface on post load, Markus Armbruster, 2012/11/28