From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38732) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIwzx-00009M-Gh for qemu-devel@nongnu.org; Fri, 22 Mar 2013 04:06:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIwx4-00066p-Pq for qemu-devel@nongnu.org; Fri, 22 Mar 2013 04:04:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16264) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIwx4-00066O-G8 for qemu-devel@nongnu.org; Fri, 22 Mar 2013 04:03:50 -0400 Message-ID: <514C112F.6000301@redhat.com> Date: Fri, 22 Mar 2013 09:07:11 +0100 From: Hans de Goede MIME-Version: 1.0 References: <87boadc2yp.fsf@codemonkey.ws> <1363883716-30289-1-git-send-email-alevy@redhat.com> <1363883716-30289-3-git-send-email-alevy@redhat.com> In-Reply-To: <1363883716-30289-3-git-send-email-alevy@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/2] spice-qemu-char: register interface on post load List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alon Levy Cc: amit.shah@redhat.com, aliguori@us.ibm.com, qemu-devel@nongnu.org, kraxel@redhat.com Ji, On 03/21/2013 05:35 PM, 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. > > Note that qemu_be_is_fe_connected is called when the vm is already > running, to avoid any possible order of vmstate loading issue, i.e. > device loading after chardev post_load being called back. This seems needlessly complicated, I agree you should wait with calling qemu_be_is_fe_connected till the vm is running, but why not simply use qemu_add_vm_change_state_handler for that, and in the handler check for state == RUN_STATE_RUNNING ? Regards, Hans