From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32892) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WlQTE-0005wb-Qi for qemu-devel@nongnu.org; Fri, 16 May 2014 18:19:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WlQT8-0007A1-SK for qemu-devel@nongnu.org; Fri, 16 May 2014 18:19:16 -0400 Received: from mail-pa0-x235.google.com ([2607:f8b0:400e:c03::235]:38290) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WlQT8-00079v-Ii for qemu-devel@nongnu.org; Fri, 16 May 2014 18:19:10 -0400 Received: by mail-pa0-f53.google.com with SMTP id kp14so3099214pab.12 for ; Fri, 16 May 2014 15:19:09 -0700 (PDT) Date: Sat, 17 May 2014 08:18:51 +1000 From: "Edgar E. Iglesias" Message-ID: <20140516221851.GD18802@zapo.iiNet> References: <1399356506-5609-1-git-send-email-edgar.iglesias@gmail.com> <1399356506-5609-3-git-send-email-edgar.iglesias@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v1 02/22] target-arm: Make elr_el1 an array List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Rob Herring , Peter Crosthwaite , QEMU Developers , Alexander Graf , John Williams , Alex =?iso-8859-1?Q?Benn=E9e?= On Fri, May 16, 2014 at 03:22:40PM +0100, Peter Maydell wrote: > On 6 May 2014 07:08, Edgar E. Iglesias wrote: > > From: "Edgar E. Iglesias" > > > > No functional change. > > Prepares for future additions of the EL2 and 3 versions of this reg. > > > --- a/target-arm/machine.c > > +++ b/target-arm/machine.c > > @@ -243,7 +243,7 @@ const VMStateDescription vmstate_arm_cpu = { > > VMSTATE_UINT32_ARRAY(env.banked_r14, ARMCPU, 6), > > VMSTATE_UINT32_ARRAY(env.usr_regs, ARMCPU, 5), > > VMSTATE_UINT32_ARRAY(env.fiq_regs, ARMCPU, 5), > > - VMSTATE_UINT64(env.elr_el1, ARMCPU), > > + VMSTATE_UINT64(env.elr_el[ELR_EL_IDX(1)], ARMCPU), > > VMSTATE_UINT64_ARRAY(env.sp_el, ARMCPU, 2), > > /* The length-check must come before the arrays to avoid > > * incoming data possibly overflowing the array. > > Do we add the rest of the elr_el[] array to the vmstate in > a later patch? Yes. I can squash the patches if you prefer but I did find it useful to do some of these changes in steps of non-functional change followed by the actual usage/addition of EL2/3 while developing. Cheers, Edgar