From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35368) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ru0CV-0005vA-GJ for qemu-devel@nongnu.org; Sun, 05 Feb 2012 06:24:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ru0CT-0003C4-Eu for qemu-devel@nongnu.org; Sun, 05 Feb 2012 06:24:07 -0500 Received: from mail-ey0-f173.google.com ([209.85.215.173]:55460) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ru0CS-0003Bm-NE for qemu-devel@nongnu.org; Sun, 05 Feb 2012 06:24:05 -0500 Received: by eaao14 with SMTP id o14so2222194eaa.4 for ; Sun, 05 Feb 2012 03:24:02 -0800 (PST) Sender: Paolo Bonzini Message-ID: <4F2E66C7.8070505@redhat.com> Date: Sun, 05 Feb 2012 12:23:51 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <77a9fa5aa9aae73889803315c291418a4d99505a.1328438750.git.jan.kiszka@web.de> In-Reply-To: <77a9fa5aa9aae73889803315c291418a4d99505a.1328438750.git.jan.kiszka@web.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Jan Kiszka Cc: Anthony Liguori , Marcelo Tosatti , Avi Kivity , kvm@vger.kernel.org, qemu-devel 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 = qemu_get_be64(f); > s->irq_disabled = 0; > - if (s->irq_timer) { > + if (i == 0) { > s->next_transition_time = qemu_get_be64(f); > - qemu_get_timer(f, s->irq_timer); > } > } > return 0; You need to invoke the post load callback manually in the load_old callback; see vmstate_load_state: if (version_id < vmsd->minimum_version_id) { return vmsd->load_state_old(f, opaque, version_id); } 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: if (version_id >= 2) { qemu_get_timer(f, s->timer); } Paolo