From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52526) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHqc4-0004Q4-Pr for qemu-devel@nongnu.org; Tue, 19 Mar 2013 03:05:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UHqby-0001V3-U1 for qemu-devel@nongnu.org; Tue, 19 Mar 2013 03:05:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:21312) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHqby-0001Ur-Lq for qemu-devel@nongnu.org; Tue, 19 Mar 2013 03:05:30 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r2J75TsY002528 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 19 Mar 2013 03:05:30 -0400 Message-ID: <51480E36.4090407@redhat.com> Date: Tue, 19 Mar 2013 08:05:26 +0100 From: Gerd Hoffmann MIME-Version: 1.0 References: <1363279017-3894-1-git-send-email-hdegoede@redhat.com> <1363279017-3894-8-git-send-email-hdegoede@redhat.com> In-Reply-To: <1363279017-3894-8-git-send-email-hdegoede@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 7/8] spice-qemu-char: Register interface on post load List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hans de Goede Cc: Amit Shah , Alon Levy , =?ISO-8859-1?Q?Marc-Andr=E9_Lureau?= , qemu-devel@nongnu.org On 03/14/13 17:36, Hans de Goede wrote: > From: Alon Levy > > 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. > +static VMStateDescription spice_chr_vmstate = { > + .name = "spice-chr", > + .version_id = 1, > + .minimum_version_id = 1, > + .post_load = spice_chr_post_load, > + .fields = (VMStateField[]) { > + VMSTATE_UINT32(guest_open, SpiceCharDriver), > + VMSTATE_END_OF_LIST() > + }, > +}; > + vmstate_register(NULL, -1, &spice_chr_vmstate, s); > + That is a showstopper. If there are two of these there is no reliable way to figure which is which. Do we actually need that in the first place? I assume virtio-serial will migrate the guest-open state anyway. So if we can use that somehow we don't have to live migrate the chardev state ... cheers, Gerd