From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:55404) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RNfFy-0002Mx-EW for qemu-devel@nongnu.org; Tue, 08 Nov 2011 01:34:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RNfFx-0002Mm-Bt for qemu-devel@nongnu.org; Tue, 08 Nov 2011 01:34:02 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47745) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RNfFx-0002Mh-50 for qemu-devel@nongnu.org; Tue, 08 Nov 2011 01:34:01 -0500 Message-ID: <4EB8CD52.1000008@redhat.com> Date: Tue, 08 Nov 2011 08:33:54 +0200 From: Avi Kivity MIME-Version: 1.0 References: <1319540983-4248-1-git-send-email-benoit.canet@gmail.com> <1319540983-4248-5-git-send-email-benoit.canet@gmail.com> In-Reply-To: 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: Peter Maydell Cc: =?UTF-8?B?QmVub8OudCBDYW5l?= =?UTF-8?B?dA==?= , qemu-devel@nongnu.org, quintela@redhat.com On 11/08/2011 04:07 AM, Peter Maydell wrote: > 2011/10/26 Peter Maydell : > > On 25 October 2011 12:09, Beno=C3=AEt Canet = wrote: > >> +static const VMStateDescription vmstate_integratorcm =3D { > >> + .name =3D "integratorcm", > >> + .version_id =3D 1, > >> + .minimum_version_id =3D 1, > >> + .minimum_version_id_old =3D 1, > >> + .fields =3D (VMStateField[]) { > >> + VMSTATE_UINT32(memsz, integratorcm_state), > >> + VMSTATE_BOOL(flash_mapped, integratorcm_state), > > > > 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. > > Avi, ping? I'm still interested in the answer to this question. Sorry, missed this. Yes, you need to ensure the memory region mapping reflects flash_mapped. btw, is flash_mapped a real device state (corresponds to a real memory bit on the device) or just an artefact? It's usually a bad idea to cast implementation artefacts in vmstate concrete. --=20 I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.