From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43067) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIFk2-0005zz-J6 for qemu-devel@nongnu.org; Wed, 20 Mar 2013 05:55:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIFk0-0002DC-Rx for qemu-devel@nongnu.org; Wed, 20 Mar 2013 05:55:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:15727) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIFk0-0002D7-IQ for qemu-devel@nongnu.org; Wed, 20 Mar 2013 05:55:28 -0400 From: Alon Levy Date: Wed, 20 Mar 2013 11:55:14 +0200 Message-Id: <1363773314-32332-5-git-send-email-alevy@redhat.com> In-Reply-To: <1363773314-32332-1-git-send-email-alevy@redhat.com> References: <1363773314-32332-1-git-send-email-alevy@redhat.com> Subject: [Qemu-devel] [PATCH 4/4] spice-qemu-char: register interface on post load List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: amit.shah@redhat.com, hdegoede@redhat.com, aliguori@us.ibm.com, kraxel@redhat.com 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 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/spice-qemu-char.c b/spice-qemu-char.c index 8a9236d..c6aed58 100644 --- a/spice-qemu-char.c +++ b/spice-qemu-char.c @@ -205,6 +205,14 @@ static void print_allowed_subtypes(void) fprintf(stderr, "\n"); } +static void spice_chr_post_load(struct CharDriverState *chr, + int connected) +{ + if (connected) { + spice_chr_guest_open(chr); + } +} + static CharDriverState *chr_open(const char *subtype) { CharDriverState *chr; @@ -220,6 +228,7 @@ static CharDriverState *chr_open(const char *subtype) chr->chr_close = spice_chr_close; chr->chr_guest_open = spice_chr_guest_open; chr->chr_guest_close = spice_chr_guest_close; + chr->chr_post_load = spice_chr_post_load; QLIST_INSERT_HEAD(&spice_chars, s, next); -- 1.8.1.4