From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48321) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcbAO-0003Uh-OO for qemu-devel@nongnu.org; Wed, 15 May 2013 08:50:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UcbAN-0008Va-DG for qemu-devel@nongnu.org; Wed, 15 May 2013 08:50:48 -0400 Received: from mail-ye0-f174.google.com ([209.85.213.174]:48053) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcbAM-0008VL-Sc for qemu-devel@nongnu.org; Wed, 15 May 2013 08:50:47 -0400 Received: by mail-ye0-f174.google.com with SMTP id r13so336102yen.33 for ; Wed, 15 May 2013 05:50:45 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5193849D.4070408@redhat.com> Date: Wed, 15 May 2013 14:50:37 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <51935609.4020705@greensocs.com> In-Reply-To: <51935609.4020705@greensocs.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [RFC] save/restore with icount enabled. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-1?Q?KONRAD_Fr=E9d=E9ric?= Cc: Mark Burton , qemu-devel Il 15/05/2013 11:31, KONRAD Frédéric ha scritto: > Hi, > > We are trying to do a simple save/restore on the VM with icount enabled. > > We saw that qemu_icount_bias and qemu_icount in cpus.c are not > saved/restored, > and icount_extra, icount_decr in CPUState neither, so the vm_clock is just > growing normally after restoring the VM is that normal? > > We think that this is making the "replay" undeterminastic, which is bad for > reverse execution. > > Is there a good reason for them not being saved? No. You can probably move icount to timers_state. Something like zeroing qemu_icount in cpu_disable_ticks() is required in order to save qemu_icount_bias like the other members of timers_state. There is even a dummy field that you can reuse to avoid the pain of adding a subsection to vmstate_timers. :) Paolo > > Thanks, > Fred > >