From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:32851) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rcnei-0000Hz-0i for qemu-devel@nongnu.org; Mon, 19 Dec 2011 19:34:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rcneg-0001ri-Bd for qemu-devel@nongnu.org; Mon, 19 Dec 2011 19:34:07 -0500 Received: from fmmailgate01.web.de ([217.72.192.221]:38692) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rcnef-0001rc-Vx for qemu-devel@nongnu.org; Mon, 19 Dec 2011 19:34:06 -0500 Received: from moweb002.kundenserver.de (moweb002.kundenserver.de [172.19.20.108]) by fmmailgate01.web.de (Postfix) with ESMTP id E63D21A5C4BF6 for ; Tue, 20 Dec 2011 01:34:04 +0100 (CET) Message-ID: <4EEFD7FA.9010407@web.de> Date: Tue, 20 Dec 2011 01:34:02 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <61e59db37279bb3834b996c84e9a0523638f5e35.1323952403.git.jan.kiszka@siemens.com> <4EEFB8FB.3030105@codemonkey.ws> <4EEFCC92.9030300@web.de> <4EEFD767.2050703@codemonkey.ws> In-Reply-To: <4EEFD767.2050703@codemonkey.ws> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig37D675287C35EC57B6FD4376" Subject: Re: [Qemu-devel] [PATCH v5 07/16] apic: Open-code timer save/restore List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: kvm@vger.kernel.org, "Michael S. Tsirkin" , Marcelo Tosatti , qemu-devel , Blue Swirl , Avi Kivity This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig37D675287C35EC57B6FD4376 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2011-12-20 01:31, Anthony Liguori wrote: > On 12/19/2011 05:45 PM, Jan Kiszka wrote: >> On 2011-12-19 23:21, Anthony Liguori wrote: >>> On 12/15/2011 06:33 AM, Jan Kiszka wrote: >>>> To enable migration between accelerated and non-accelerated APIC >>>> models, >>>> we will need to handle the timer saving and restoring specially and = can >>>> no longer rely on the automatics of VMSTATE_TIMER. Specifically, >>>> accelerated model will not start any QEMUTimer. >>>> >>>> This patch therefore factors out the generic bits into apic_next_tim= er >>>> and introduces a post-load callback that can be implemented differen= tly >>>> by both models. >>>> >>>> Signed-off-by: Jan Kiszka >>> >>> So you basically want the timer to be a dummy field for the in-kernel= >>> apic? >>> >>> Can you fix this up in a pre-save routine (put QEMUTimer into a state= >>> where there isn't an event pending)? >> >> It is not a dummy field, it contains the proper state in both cases. W= e >> just need to convert it to an open-coded state to avoid the QEMUTimer >> restoration magic in the in-kernel case (where there must be no >> QEMUTimer). >=20 > So the state gets fed into the kernel instead of userspace? Nope. It's kept for eventual use by a user space model. >=20 > This seems a bit much to me, can't we just have two VMStateDescriptions= > that happen to look the same and break migration between userspace and > in-kernel? There is nothing broken, at least according to my tests. Migration works between both backend variants. Jan --------------enig37D675287C35EC57B6FD4376 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk7v1/oACgkQitSsb3rl5xQKxACeMFrI9gaSBkWVBqKR9GWh5bru grQAniyDZ0F0gNTFclzcKTVFQ2/0dtjb =oFg3 -----END PGP SIGNATURE----- --------------enig37D675287C35EC57B6FD4376--