From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54280) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tn2dI-00089O-Hj for qemu-devel@nongnu.org; Mon, 24 Dec 2012 02:39:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tn2dC-0006nU-KN for qemu-devel@nongnu.org; Mon, 24 Dec 2012 02:39:32 -0500 Received: from mx1.redhat.com ([209.132.183.28]:13051) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tn2dC-0006nA-Cu for qemu-devel@nongnu.org; Mon, 24 Dec 2012 02:39:26 -0500 Date: Mon, 24 Dec 2012 13:09:20 +0530 From: Amit Shah Message-ID: <20121224073920.GC21637@amit.redhat.com> References: <20121214041007.GC12267@amit.redhat.com> <1356298529-7334-1-git-send-email-alevy@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1356298529-7334-1-git-send-email-alevy@redhat.com> Subject: Re: [Qemu-devel] [PATCH] spice-qemu-char: register interface on post load List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alon Levy Cc: qemu-devel@nongnu.org, anthony@codemonkey.ws, Gerd Hoffmann 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 > --- > 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