From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:33337) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ru0Lz-0007Df-Vi for qemu-devel@nongnu.org; Sun, 05 Feb 2012 06:34:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ru0Lv-0004em-Ne for qemu-devel@nongnu.org; Sun, 05 Feb 2012 06:33:55 -0500 Received: from fmmailgate02.web.de ([217.72.192.227]:47429) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ru0Lv-0004ef-EJ for qemu-devel@nongnu.org; Sun, 05 Feb 2012 06:33:51 -0500 Received: from moweb002.kundenserver.de (moweb002.kundenserver.de [172.19.20.108]) by fmmailgate02.web.de (Postfix) with ESMTP id 342321C0A4D00 for ; Sun, 5 Feb 2012 12:33:50 +0100 (CET) Message-ID: <4F2E6917.2080900@web.de> Date: Sun, 05 Feb 2012 12:33:43 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <77a9fa5aa9aae73889803315c291418a4d99505a.1328438750.git.jan.kiszka@web.de> <4F2E66C7.8070505@redhat.com> In-Reply-To: <4F2E66C7.8070505@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig511240E8BDCEA701FEC44266" Subject: Re: [Qemu-devel] [PATCH 2/4] i8254: Open-code timer restore List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Anthony Liguori , Marcelo Tosatti , Avi Kivity , kvm@vger.kernel.org, qemu-devel This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig511240E8BDCEA701FEC44266 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2012-02-05 12:23, Paolo Bonzini wrote: > On 02/05/2012 11:46 AM, Jan Kiszka wrote: >> diff --git a/hw/i8254_common.c b/hw/i8254_common.c >> index 0601d88..b60fbda 100644 >> --- a/hw/i8254_common.c >> +++ b/hw/i8254_common.c >> @@ -234,9 +234,8 @@ static int pit_load_old(QEMUFile *f, void *opaque,= >> int version_id) >> qemu_get_8s(f,&s->gate); >> s->count_load_time =3D qemu_get_be64(f); >> s->irq_disabled =3D 0; >> - if (s->irq_timer) { >> + if (i =3D=3D 0) { >> s->next_transition_time =3D qemu_get_be64(f); >> - qemu_get_timer(f, s->irq_timer); >> } >> } >> return 0; >=20 > You need to invoke the post load callback manually in the load_old > callback; see vmstate_load_state: >=20 > if (version_id < vmsd->minimum_version_id) { > return vmsd->load_state_old(f, opaque, version_id); > } >=20 > I noticed that in apic_common's apic_load_old you don't have the bug, > but on the other hand you're unconditionally loading into s->timer, so > "old" migration to a destination with in-kernel APIC doesn't work: >=20 > if (version_id >=3D 2) { > qemu_get_timer(f, s->timer); > } >=20 Hmm, true. The whole load_old is broken, in both APIC and PIT. Need to call the post_load callbacks from there as well. Will fix, thanks. Jan --------------enig511240E8BDCEA701FEC44266 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/ iEYEARECAAYFAk8uaRsACgkQitSsb3rl5xQiiwCgx6CWsEKsPkbAyo+2Mw0Gs56y oBMAn2KBs42F+aoRWOJ3lYjdQzF6E0HT =JL0O -----END PGP SIGNATURE----- --------------enig511240E8BDCEA701FEC44266--