From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=50996 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PuQ1T-0008Ax-Ep for qemu-devel@nongnu.org; Tue, 01 Mar 2011 08:56:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PuQ1M-0005yS-Fd for qemu-devel@nongnu.org; Tue, 01 Mar 2011 08:53:49 -0500 Received: from mail-ew0-f45.google.com ([209.85.215.45]:41633) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PuQ1M-0005y3-BV for qemu-devel@nongnu.org; Tue, 01 Mar 2011 08:53:48 -0500 Received: by ewy24 with SMTP id 24so1782562ewy.4 for ; Tue, 01 Mar 2011 05:53:46 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <1298982742-31154-1-git-send-email-peter.maydell@linaro.org> <1298982742-31154-2-git-send-email-peter.maydell@linaro.org> Date: Tue, 1 Mar 2011 13:53:46 +0000 Message-ID: From: Peter Maydell Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Re: [PATCH 1/2] hw/arm_sysctl.c: Add the Versatile Express system registers List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: quintela@redhat.com Cc: patches@linaro.org, Bahadir Balban , qemu-devel@nongnu.org, Amit Mahajan , =?UTF-8?B?RGF3aWQgQ2nEmcW8YXJraWV3aWN6?= 2011/3/1 Juan Quintela : > Peter Maydell wrote: > > Hi > >> @@ -41,6 +44,9 @@ static const VMStateDescription vmstate_arm_sysctl =3D= { >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0VMSTATE_UINT32(flags, arm_sysctl_state= ), >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0VMSTATE_UINT32(nvflags, arm_sysctl_sta= te), >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0VMSTATE_UINT32(resetlevel, arm_sysctl_= state), >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0VMSTATE_UINT32(sys_cfgdata, arm_sysctl_stat= e), >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0VMSTATE_UINT32(sys_cfgctrl, arm_sysctl_stat= e), >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0VMSTATE_UINT32(sys_cfgstat, arm_sysctl_stat= e), >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0VMSTATE_END_OF_LIST() >> =C2=A0 =C2=A0 =C2=A0} >> =C2=A0}; > > Three options (about migration): > - left things as they are and become incompatible without changing versio= ns > - if you don't care about backward compatibility, just add +1 to all the > =C2=A0version fields and you are done. > - add this fields only for the new version. > > IMHO 1st one is the worse option. =C2=A0I will go with the middle one (as= far > as I know, nobody on arm uses interversion migration (as far as I know, > nobody uses migration at all). OK, so in: static const VMStateDescription vmstate_arm_sysctl =3D { .name =3D "realview_sysctl", .version_id =3D 1, .minimum_version_id =3D 1, I just bump the '1' in both cases to '2' ? I've only ever used the save/restore for debugging purposes. We know for certain that nobody can have been doing migration with versatile platforms before this year, because we only added save/load support to arm_sysctl.c in December 2010 :-) (What's the equivalent version-bump that needs to be done when entries are added to target-arm/machine.c's save and restore code?) thanks -- PMM