qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] spice-qemu-char: register interface on post loa


From: Amit Shah
Subject: Re: [Qemu-devel] [PATCH] spice-qemu-char: register interface on post load
Date: Mon, 24 Dec 2012 13:09:20 +0530

On (Sun) 23 Dec 2012 [23:35:29], Alon Levy wrote:
> The target has not seen the guest_connected event via
> spice_chr_guest_open or spice_chr_write, and so spice server wrongly
> assumes there is no agent active, while the client continues to send
> motion events only by the agent channel, which the server ignores. The
> net effect is that the mouse is static in the guest.
> 
> By registering the interface on post load spice server will pass on the
> agent messages fixing the mouse behavior after migration.
> 
> RHBZ #725965
> 
> Signed-off-by: Alon Levy <address@hidden>
> ---
>  spice-qemu-char.c | 42 ++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 42 insertions(+)

I suppose Gerd should pick this up in his tree?

I have a couple of questions below, but I ack this approach.

>  static QLIST_HEAD(, SpiceCharDriver) spice_chars =
> @@ -185,18 +190,23 @@ static void spice_chr_close(struct CharDriverState *chr)
>      printf("%s\n", __func__);
>      vmc_unregister_interface(s);
>      QLIST_REMOVE(s, next);
> +    qemu_free_timer(s->post_load.timer);

Also vmstate_unregister()?

I'm wondering if there can be a case where this function is called
before the timer has had a chance to fire.  It can happen if the spice
port is hot-unplugged before the guest has had a chance to run on the
target.  In that case, qemu_del_timer() should be called as well, to
ensure the timer doesn't fire with invalid args later.

                Amit



reply via email to

[Prev in Thread] Current Thread [Next in Thread]