From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:54512) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJ7DM-0003IK-26 for qemu-devel@nongnu.org; Wed, 26 Oct 2011 13:24:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RJ7DK-0004P1-J9 for qemu-devel@nongnu.org; Wed, 26 Oct 2011 13:24:32 -0400 Received: from mail-qw0-f45.google.com ([209.85.216.45]:35510) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJ7DK-0004Os-Bj for qemu-devel@nongnu.org; Wed, 26 Oct 2011 13:24:30 -0400 Received: by qadc12 with SMTP id c12so2106499qad.4 for ; Wed, 26 Oct 2011 10:24:29 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1319540983-4248-5-git-send-email-benoit.canet@gmail.com> References: <1319540983-4248-1-git-send-email-benoit.canet@gmail.com> <1319540983-4248-5-git-send-email-benoit.canet@gmail.com> Date: Wed, 26 Oct 2011 18:24:28 +0100 Message-ID: From: Peter Maydell Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 4/5] integratorcp: convert integratorcm to VMState List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Beno=C3=AEt_Canet?= Cc: Avi Kivity , qemu-devel@nongnu.org, quintela@redhat.com On 25 October 2011 12:09, Beno=C3=AEt Canet wrote: > +static const VMStateDescription vmstate_integratorcm =3D { > + =C2=A0 =C2=A0.name =3D "integratorcm", > + =C2=A0 =C2=A0.version_id =3D 1, > + =C2=A0 =C2=A0.minimum_version_id =3D 1, > + =C2=A0 =C2=A0.minimum_version_id_old =3D 1, > + =C2=A0 =C2=A0.fields =3D (VMStateField[]) { > + =C2=A0 =C2=A0 =C2=A0 =C2=A0VMSTATE_UINT32(memsz, integratorcm_state), > + =C2=A0 =C2=A0 =C2=A0 =C2=A0VMSTATE_BOOL(flash_mapped, integratorcm_stat= e), This raises a question. flash_mapped here is a flag which just tracks whether the associated MemoryRegion is currently mapped or unmapped. Do we need to do anything special to ensure that the MemoryRegion itself is reset to the correct mapped/unmapped state on restore? I recall discussing this kind of thing with Avi on IRC but I can't remember what the conclusion was. -- PMM