qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Amit Shah <amit.shah@redhat.com>
To: Alon Levy <alevy@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>,
	qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] hw/virtio-serial-bus: replay guest open on destination
Date: Tue, 27 Nov 2012 18:18:15 +0530	[thread overview]
Message-ID: <20121127124815.GD10280@amit.redhat.com> (raw)
In-Reply-To: <1353850754-22704-1-git-send-email-alevy@redhat.com>

On (Sun) 25 Nov 2012 [15:39:14], Alon Levy wrote:
> 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.

Thanks for continuing to pursue this :)

> 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);
> +        }

I think the last time we discussed this, my objection was the guest
isn't really doing an open again, and since spice depends on the
guest's connectedness, spice should have a post-load hook or a similar
bh that would query virtio-serial for guest connectedness status, and,
if connected, do whatever setup is necessary.

Adding Gerd and Markus as I think they were involved in the discussion
last time as well.

		Amit

  reply	other threads:[~2012-11-27 12:48 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-25 13:39 [Qemu-devel] [PATCH] hw/virtio-serial-bus: replay guest open on destination Alon Levy
2012-11-27 12:48 ` Amit Shah [this message]
2012-11-27 14:10   ` Markus Armbruster
2012-11-27 14:34     ` Amit Shah
2012-11-27 19:03   ` Anthony Liguori
2012-11-28  9:05     ` [Qemu-devel] [PATCH 0/3] chardev/spice: fix missing spice mouse after migration Alon Levy
2012-11-28  9:05       ` [Qemu-devel] [PATCH 1/3] virtio-serial: add virtio_serial_guest_connected Alon Levy
2012-11-28  9:05       ` [Qemu-devel] [PATCH 2/3] qemu-char: add qemu_chr_be_connected Alon Levy
2012-11-28  9:42         ` Markus Armbruster
2012-11-28  9:05       ` [Qemu-devel] [PATCH 3/3] spice-qemu-char: register interface on post load Alon Levy
2012-11-28  9:46         ` Markus Armbruster
2012-11-28  9:51           ` Alon Levy
2012-11-28 11:59             ` Markus Armbruster
2012-11-28 12:16               ` Alon Levy
2012-11-29 13:08               ` Amit Shah
2012-12-13 10:54       ` [Qemu-devel] [PATCH 0/3] chardev/spice: fix missing spice mouse after migration Amit Shah
2012-12-13 14:25         ` Anthony Liguori
2012-12-14  4:10           ` Amit Shah
2012-12-23 21:35             ` [Qemu-devel] [PATCH] spice-qemu-char: register interface on post load Alon Levy
2012-12-24  7:39               ` Amit Shah

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121127124815.GD10280@amit.redhat.com \
    --to=amit.shah@redhat.com \
    --cc=alevy@redhat.com \
    --cc=armbru@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).