From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56709) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wz7Uj-00078d-PH for qemu-devel@nongnu.org; Mon, 23 Jun 2014 12:53:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wz7Ud-0002Ez-MG for qemu-devel@nongnu.org; Mon, 23 Jun 2014 12:53:25 -0400 Received: from mail-qc0-f172.google.com ([209.85.216.172]:34248) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wz7Ud-0002Dq-Gs for qemu-devel@nongnu.org; Mon, 23 Jun 2014 12:53:19 -0400 Received: by mail-qc0-f172.google.com with SMTP id o8so6381396qcw.31 for ; Mon, 23 Jun 2014 09:53:18 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20140617061232.GD10398@toto> References: <1402444514-19658-1-git-send-email-aggelerf@ethz.ch> <1402444514-19658-29-git-send-email-aggelerf@ethz.ch> <20140617061232.GD10398@toto> Date: Mon, 23 Jun 2014 11:53:18 -0500 Message-ID: From: Greg Bellows Content-Type: multipart/alternative; boundary=001a113a9d5a1c550004fc83ae97 Subject: Re: [Qemu-devel] [PATCH v3 28/32] target-arm: make DFSR banked List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Edgar E. Iglesias" Cc: Peter Maydell , Peter Crosthwaite , Fabian Aggeler , QEMU Developers , Sergey Fedorov , Christoffer Dall --001a113a9d5a1c550004fc83ae97 Content-Type: text/plain; charset=UTF-8 I agree, if we are going to allow for EL-based array indexing then the indices should correspond to the actual EL for clarity. I am fine with the above compromise. On 17 June 2014 01:12, Edgar E. Iglesias wrote: > On Fri, Jun 13, 2014 at 05:06:15PM -0500, Greg Bellows wrote: > > I just wanted to point out that the change from array-notation to > hard-code > > numbers in the names undoes Edgar's EL2/EL3 changes. I prefer this way > > over the array notation. > > Hi, > > This was discussed briefly here > http://lists.gnu.org/archive/html/qemu-devel/2014-05/msg03561.html > > IMO, for some regs the array version doesn't make sense but for regs > that need to be indexed by EL it does. Just look at what this patch > results in for aarch64_cpu_do_interrupt(). AArch64 has a simpler/cleaner > architecture in this respect, IMO we should keep the > AArch64 simple and clean and take the banking pain in the AArch32 port. > > > > > > > > On 10 June 2014 18:55, Fabian Aggeler wrote: > > > > > When EL3 is running in Aarch32 (or ARMv7 with Security Extensions) > > > DFSR has a secure and a non-secure instance. > > > > > > Signed-off-by: Fabian Aggeler > > > --- > > > target-arm/cpu.h | 13 ++++++++++++- > > > target-arm/helper-a64.c | 17 ++++++++++++++--- > > > target-arm/helper.c | 15 ++++++++------- > > > 3 files changed, 34 insertions(+), 11 deletions(-) > > > > > > diff --git a/target-arm/cpu.h b/target-arm/cpu.h > > > index 54c51a4..71782cf 100644 > > > --- a/target-arm/cpu.h > > > +++ b/target-arm/cpu.h > > > @@ -266,7 +266,18 @@ typedef struct CPUARMState { > > > uint32_t ifsr32_el2; > > > }; > > > }; > > > - uint64_t esr_el[4]; > > > + union { > > > + struct { > > > + uint64_t dfsr_ns; > > > + uint64_t hsr; > > > + uint64_t dfsr_s; > > > + }; > > > + struct { > > > + uint64_t esr_el1; > > > + uint64_t esr_el2; > > > + uint64_t esr_el3; > > > + }; > > > + }; > > I'd prefer: > > - uint64_t esr_el[4]; > + union { > + struct { > + uint64_t dummy > + uint64_t dfsr_ns; > + uint64_t hsr; > + uint64_t dfsr_s; > + }; > + struct { > + uint64_t esr_el[4]; > + }; > + }; > > And avoid the whole target_esr pointer thing in aarch64_cpu_do_interrupt(). > > Cheers, > Edgar > > > > > uint32_t c6_region[8]; /* MPU base/size registers. */ > > > uint64_t far_el[4]; /* Fault address registers. */ > > > uint64_t par_el1; /* Translation result. */ > > > diff --git a/target-arm/helper-a64.c b/target-arm/helper-a64.c > > > index d7522b6..dbbf012 100644 > > > --- a/target-arm/helper-a64.c > > > +++ b/target-arm/helper-a64.c > > > @@ -447,6 +447,18 @@ void aarch64_cpu_do_interrupt(CPUState *cs) > > > target_ulong addr = env->cp15.vbar_el[new_el]; > > > unsigned int new_mode = aarch64_pstate_mode(new_el, true); > > > int i; > > > + uint64_t *target_esr; > > > + switch (new_el) { > > > + case 3: > > > + target_esr = &env->cp15.esr_el3; > > > + break; > > > + case 2: > > > + target_esr = &env->cp15.esr_el2; > > > + break; > > > + case 1: > > > + target_esr = &env->cp15.esr_el1; > > > + break; > > > + } > > > > > > if (arm_current_pl(env) < new_el) { > > > if (env->aarch64) { > > > @@ -477,8 +489,7 @@ void aarch64_cpu_do_interrupt(CPUState *cs) > > > case EXCP_SWI: > > > case EXCP_HVC: > > > case EXCP_SMC: > > > - env->cp15.esr_el[new_el] = env->exception.syndrome; > > > - break; > > > + *target_esr = env->exception.syndrome; > > > case EXCP_IRQ: > > > case EXCP_VIRQ: > > > addr += 0x80; > > > @@ -498,7 +509,7 @@ void aarch64_cpu_do_interrupt(CPUState *cs) > > > } else { > > > env->banked_spsr[0] = cpsr_read(env); > > > if (!env->thumb) { > > > - env->cp15.esr_el[new_el] |= 1 << 25; > > > + *target_esr |= 1 << 25; > > > } > > > env->elr_el[new_el] = env->regs[15]; > > > > > > diff --git a/target-arm/helper.c b/target-arm/helper.c > > > index f51498a..793985e 100644 > > > --- a/target-arm/helper.c > > > +++ b/target-arm/helper.c > > > @@ -1492,7 +1492,8 @@ static void vmsa_ttbr_write(CPUARMState *env, > const > > > ARMCPRegInfo *ri, > > > static const ARMCPRegInfo vmsa_cp_reginfo[] = { > > > { .name = "DFSR", .cp = 15, .crn = 5, .crm = 0, .opc1 = 0, .opc2 > = 0, > > > .access = PL1_RW, .type = ARM_CP_NO_MIGRATE, > > > - .fieldoffset = offsetoflow32(CPUARMState, cp15.esr_el[1]), > > > + .bank_fieldoffsets = { offsetoflow32(CPUARMState, cp15.dfsr_s), > > > + offsetoflow32(CPUARMState, cp15.dfsr_ns) > }, > > > .resetfn = arm_cp_reset_ignore, }, > > > { .name = "IFSR", .cp = 15, .crn = 5, .crm = 0, .opc1 = 0, .opc2 > = 1, > > > .access = PL1_RW, .resetvalue = 0, > > > @@ -1501,7 +1502,7 @@ static const ARMCPRegInfo vmsa_cp_reginfo[] = { > > > { .name = "ESR_EL1", .state = ARM_CP_STATE_AA64, > > > .opc0 = 3, .crn = 5, .crm = 2, .opc1 = 0, .opc2 = 0, > > > .access = PL1_RW, > > > - .fieldoffset = offsetof(CPUARMState, cp15.esr_el[1]), > .resetvalue = > > > 0, }, > > > + .fieldoffset = offsetof(CPUARMState, cp15.esr_el1), .resetvalue > = > > > 0, }, > > > { .name = "TTBR0_EL1", .state = ARM_CP_STATE_BOTH, > > > .opc0 = 3, .crn = 2, .crm = 0, .opc1 = 0, .opc2 = 0, > > > .access = PL1_RW, .writefn = vmsa_ttbr_write, .resetvalue = 0, > > > @@ -1565,7 +1566,7 @@ static void omap_cachemaint_write(CPUARMState > *env, > > > const ARMCPRegInfo *ri, > > > static const ARMCPRegInfo omap_cp_reginfo[] = { > > > { .name = "DFSR", .cp = 15, .crn = 5, .crm = CP_ANY, > > > .opc1 = CP_ANY, .opc2 = CP_ANY, .access = PL1_RW, .type = > > > ARM_CP_OVERRIDE, > > > - .fieldoffset = offsetoflow32(CPUARMState, cp15.esr_el[1]), > > > + .fieldoffset = offsetoflow32(CPUARMState, cp15.esr_el1), > > > .resetvalue = 0, }, > > > { .name = "", .cp = 15, .crn = 15, .crm = 0, .opc1 = 0, .opc2 = 0, > > > .access = PL1_RW, .type = ARM_CP_NOP }, > > > @@ -2187,7 +2188,7 @@ static const ARMCPRegInfo v8_el2_cp_reginfo[] = { > > > { .name = "ESR_EL2", .state = ARM_CP_STATE_AA64, > > > .type = ARM_CP_NO_MIGRATE, > > > .opc0 = 3, .opc1 = 4, .crn = 5, .crm = 2, .opc2 = 0, > > > - .access = PL2_RW, .fieldoffset = offsetof(CPUARMState, > > > cp15.esr_el[2]) }, > > > + .access = PL2_RW, .fieldoffset = offsetof(CPUARMState, > > > cp15.esr_el2) }, > > > { .name = "FAR_EL2", .state = ARM_CP_STATE_AA64, > > > .opc0 = 3, .opc1 = 4, .crn = 6, .crm = 0, .opc2 = 0, > > > .access = PL2_RW, .fieldoffset = offsetof(CPUARMState, > > > cp15.far_el[2]) }, > > > @@ -2299,7 +2300,7 @@ static const ARMCPRegInfo v8_el3_cp_reginfo[] = { > > > { .name = "ESR_EL3", .state = ARM_CP_STATE_AA64, > > > .type = ARM_CP_NO_MIGRATE, > > > .opc0 = 3, .opc1 = 6, .crn = 5, .crm = 2, .opc2 = 0, > > > - .access = PL3_RW, .fieldoffset = offsetof(CPUARMState, > > > cp15.esr_el[3]) }, > > > + .access = PL3_RW, .fieldoffset = offsetof(CPUARMState, > > > cp15.esr_el3) }, > > > { .name = "FAR_EL3", .state = ARM_CP_STATE_AA64, > > > .opc0 = 3, .opc1 = 6, .crn = 6, .crm = 0, .opc2 = 0, > > > .access = PL3_RW, .fieldoffset = offsetof(CPUARMState, > > > cp15.far_el[3]) }, > > > @@ -3847,11 +3848,11 @@ void arm_cpu_do_interrupt(CPUState *cs) > > > offset = 4; > > > break; > > > case EXCP_DATA_ABORT: > > > - env->cp15.esr_el[1] = env->exception.fsr; > > > + A32_BANKED_CURRENT_REG_SET(env, dfsr, env->exception.fsr); > > > env->cp15.far_el[1] = deposit64(env->cp15.far_el[1], 0, 32, > > > env->exception.vaddress); > > > qemu_log_mask(CPU_LOG_INT, "...with DFSR 0x%x DFAR 0x%x\n", > > > - (uint32_t)env->cp15.esr_el[1], > > > + env->exception.fsr, > > > (uint32_t)env->exception.vaddress); > > > new_mode = ARM_CPU_MODE_ABT; > > > addr = 0x10; > > > -- > > > 1.8.3.2 > > > > > > > --001a113a9d5a1c550004fc83ae97 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I agree, if we are going to allow for EL-based array index= ing then the indices should correspond to the actual EL for clarity.=C2=A0<= div>
I am fine with the above compromise.


On 17 June 2014 01:12, Edgar E. Iglesias= <edgar.iglesias@gmail.com> wrote:
On Fri, Jun 13, 2014 at 05:06:15PM -0500, Greg Bellows wrot= e:
> I just wanted to point out that the change from array-notation to hard= -code
> numbers in the names undoes Edgar's EL2/EL3 changes. =C2=A0I prefe= r this way
> over the array notation.

Hi,

This was discussed briefly here
http://lists.gnu.org/archive/html/qemu-devel/2014-05/= msg03561.html

IMO, for some regs the array version doesn't make sense but for regs that need to be indexed by EL it does. Just look at what this patch
results in for aarch64_cpu_do_interrupt(). AArch64 has a simpler/cleaner architecture in this respect, IMO we should keep the
AArch64 simple and clean and take the banking pain in the AArch32 port.


>
>
> On 10 June 2014 18:55, Fabian Aggeler <aggelerf@ethz.ch> wrote:
>
> > When EL3 is running in Aarch32 (or ARMv7 with Security Extensions= )
> > DFSR has a secure and a non-secure instance.
> >
> > Signed-off-by: Fabian Aggeler <aggelerf@ethz.ch>
> > ---
> > =C2=A0target-arm/cpu.h =C2=A0 =C2=A0 =C2=A0 =C2=A0| 13 ++++++++++= ++-
> > =C2=A0target-arm/helper-a64.c | 17 ++++++++++++++---
> > =C2=A0target-arm/helper.c =C2=A0 =C2=A0 | 15 ++++++++-------
> > =C2=A03 files changed, 34 insertions(+), 11 deletions(-)
> >
> > diff --git a/target-arm/cpu.h b/target-arm/cpu.h
> > index 54c51a4..71782cf 100644
> > --- a/target-arm/cpu.h
> > +++ b/target-arm/cpu.h
> > @@ -266,7 +266,18 @@ typedef struct CPUARMState {
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0uin= t32_t ifsr32_el2;
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0};
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0};
> > - =C2=A0 =C2=A0 =C2=A0 =C2=A0uint64_t esr_el[4];
> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0union {
> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0struct {
> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0uint64_t= dfsr_ns;
> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0uint64_t= hsr;
> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0uint64_t= dfsr_s;
> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0};
> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0struct {
> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0uint64_t= esr_el1;
> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0uint64_t= esr_el2;
> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0uint64_t= esr_el3;
> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0};
> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0};

I'd prefer:

- =C2=A0 =C2=A0 =C2=A0 =C2=A0uint64_t esr_el[4];
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0union {
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0struct {
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0uint64_t dum= my
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ui= nt64_t dfsr_ns;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0uint64_t hsr;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0uint64_t dfsr_s; + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0};
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0struct {
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0uint64_t esr= _el[4];
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0};
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0};

And avoid the whole target_esr pointer thing in aarch64_cpu_do_interrupt().=

Cheers,
Edgar


> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0uint32_t c6_region[8]; /* MPU b= ase/size registers. =C2=A0*/
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0uint64_t far_el[4]; /* Fault ad= dress registers. =C2=A0*/
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0uint64_t par_el1; =C2=A0/* Tran= slation result. */
> > diff --git a/target-arm/helper-a64.c b/target-arm/helper-a64.c > > index d7522b6..dbbf012 100644
> > --- a/target-arm/helper-a64.c
> > +++ b/target-arm/helper-a64.c
> > @@ -447,6 +447,18 @@ void aarch64_cpu_do_interrupt(CPUState *cs)<= br> > > =C2=A0 =C2=A0 =C2=A0target_ulong addr =3D env->cp15.vbar_el[ne= w_el];
> > =C2=A0 =C2=A0 =C2=A0unsigned int new_mode =3D aarch64_pstate_mode= (new_el, true);
> > =C2=A0 =C2=A0 =C2=A0int i;
> > + =C2=A0 =C2=A0uint64_t *target_esr;
> > + =C2=A0 =C2=A0switch (new_el) {
> > + =C2=A0 =C2=A0case 3:
> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0target_esr =3D &env->cp15.esr= _el3;
> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
> > + =C2=A0 =C2=A0case 2:
> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0target_esr =3D &env->cp15.esr= _el2;
> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
> > + =C2=A0 =C2=A0case 1:
> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0target_esr =3D &env->cp15.esr= _el1;
> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
> > + =C2=A0 =C2=A0}
> >
> > =C2=A0 =C2=A0 =C2=A0if (arm_current_pl(env) < new_el) {
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (env->aarch64) {
> > @@ -477,8 +489,7 @@ void aarch64_cpu_do_interrupt(CPUState *cs) > > =C2=A0 =C2=A0 =C2=A0case EXCP_SWI:
> > =C2=A0 =C2=A0 =C2=A0case EXCP_HVC:
> > =C2=A0 =C2=A0 =C2=A0case EXCP_SMC:
> > - =C2=A0 =C2=A0 =C2=A0 =C2=A0env->cp15.esr_el[new_el] =3D env-= >exception.syndrome;
> > - =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0*target_esr =3D env->exception.sy= ndrome;
> > =C2=A0 =C2=A0 =C2=A0case EXCP_IRQ:
> > =C2=A0 =C2=A0 =C2=A0case EXCP_VIRQ:
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0addr +=3D 0x80;
> > @@ -498,7 +509,7 @@ void aarch64_cpu_do_interrupt(CPUState *cs) > > =C2=A0 =C2=A0 =C2=A0} else {
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0env->banked_spsr[0] =3D cpsr= _read(env);
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!env->thumb) {
> > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0env->cp15.esr_el[ne= w_el] |=3D 1 << 25;
> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0*target_esr |=3D 1 <= ;< 25;
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0env->elr_el[new_el] =3D env-= >regs[15];
> >
> > diff --git a/target-arm/helper.c b/target-arm/helper.c
> > index f51498a..793985e 100644
> > --- a/target-arm/helper.c
> > +++ b/target-arm/helper.c
> > @@ -1492,7 +1492,8 @@ static void vmsa_ttbr_write(CPUARMState *en= v, const
> > ARMCPRegInfo *ri,
> > =C2=A0static const ARMCPRegInfo vmsa_cp_reginfo[] =3D {
> > =C2=A0 =C2=A0 =C2=A0{ .name =3D "DFSR", .cp =3D 15, .cr= n =3D 5, .crm =3D 0, .opc1 =3D 0, .opc2 =3D 0,
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0.access =3D PL1_RW, .type =3D ARM_CP_N= O_MIGRATE,
> > - =C2=A0 =C2=A0 =C2=A0.fieldoffset =3D offsetoflow32(CPUARMState,= cp15.esr_el[1]),
> > + =C2=A0 =C2=A0 =C2=A0.bank_fieldoffsets =3D { offsetoflow32(CPUA= RMState, cp15.dfsr_s),
> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 offsetoflow32(CPUARMState, cp15.dfsr_ns)= },
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0.resetfn =3D arm_cp_reset_ignore, }, > > =C2=A0 =C2=A0 =C2=A0{ .name =3D "IFSR", .cp =3D 15, .cr= n =3D 5, .crm =3D 0, .opc1 =3D 0, .opc2 =3D 1,
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0.access =3D PL1_RW, .resetvalue =3D 0,=
> > @@ -1501,7 +1502,7 @@ static const ARMCPRegInfo vmsa_cp_reginfo[]= =3D {
> > =C2=A0 =C2=A0 =C2=A0{ .name =3D "ESR_EL1", .state =3D A= RM_CP_STATE_AA64,
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0.opc0 =3D 3, .crn =3D 5, .crm =3D 2, .= opc1 =3D 0, .opc2 =3D 0,
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0.access =3D PL1_RW,
> > - =C2=A0 =C2=A0 =C2=A0.fieldoffset =3D offsetof(CPUARMState, cp15= .esr_el[1]), .resetvalue =3D
> > 0, },
> > + =C2=A0 =C2=A0 =C2=A0.fieldoffset =3D offsetof(CPUARMState, cp15= .esr_el1), .resetvalue =3D
> > 0, },
> > =C2=A0 =C2=A0 =C2=A0{ .name =3D "TTBR0_EL1", .state =3D= ARM_CP_STATE_BOTH,
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0.opc0 =3D 3, .crn =3D 2, .crm =3D 0, .= opc1 =3D 0, .opc2 =3D 0,
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0.access =3D PL1_RW, .writefn =3D vmsa_= ttbr_write, .resetvalue =3D 0,
> > @@ -1565,7 +1566,7 @@ static void omap_cachemaint_write(CPUARMSta= te *env,
> > const ARMCPRegInfo *ri,
> > =C2=A0static const ARMCPRegInfo omap_cp_reginfo[] =3D {
> > =C2=A0 =C2=A0 =C2=A0{ .name =3D "DFSR", .cp =3D 15, .cr= n =3D 5, .crm =3D CP_ANY,
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0.opc1 =3D CP_ANY, .opc2 =3D CP_ANY, .a= ccess =3D PL1_RW, .type =3D
> > ARM_CP_OVERRIDE,
> > - =C2=A0 =C2=A0 =C2=A0.fieldoffset =3D offsetoflow32(CPUARMState,= cp15.esr_el[1]),
> > + =C2=A0 =C2=A0 =C2=A0.fieldoffset =3D offsetoflow32(CPUARMState,= cp15.esr_el1),
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0.resetvalue =3D 0, },
> > =C2=A0 =C2=A0 =C2=A0{ .name =3D "", .cp =3D 15, .crn = =3D 15, .crm =3D 0, .opc1 =3D 0, .opc2 =3D 0,
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0.access =3D PL1_RW, .type =3D ARM_CP_N= OP },
> > @@ -2187,7 +2188,7 @@ static const ARMCPRegInfo v8_el2_cp_reginfo= [] =3D {
> > =C2=A0 =C2=A0 =C2=A0{ .name =3D "ESR_EL2", .state =3D A= RM_CP_STATE_AA64,
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0.type =3D ARM_CP_NO_MIGRATE,
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0.opc0 =3D 3, .opc1 =3D 4, .crn =3D 5, = .crm =3D 2, .opc2 =3D 0,
> > - =C2=A0 =C2=A0 =C2=A0.access =3D PL2_RW, .fieldoffset =3D offset= of(CPUARMState,
> > cp15.esr_el[2]) },
> > + =C2=A0 =C2=A0 =C2=A0.access =3D PL2_RW, .fieldoffset =3D offset= of(CPUARMState,
> > cp15.esr_el2) },
> > =C2=A0 =C2=A0 =C2=A0{ .name =3D "FAR_EL2", .state =3D A= RM_CP_STATE_AA64,
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0.opc0 =3D 3, .opc1 =3D 4, .crn =3D 6, = .crm =3D 0, .opc2 =3D 0,
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0.access =3D PL2_RW, .fieldoffset =3D o= ffsetof(CPUARMState,
> > cp15.far_el[2]) },
> > @@ -2299,7 +2300,7 @@ static const ARMCPRegInfo v8_el3_cp_reginfo= [] =3D {
> > =C2=A0 =C2=A0 =C2=A0{ .name =3D "ESR_EL3", .state =3D A= RM_CP_STATE_AA64,
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0.type =3D ARM_CP_NO_MIGRATE,
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0.opc0 =3D 3, .opc1 =3D 6, .crn =3D 5, = .crm =3D 2, .opc2 =3D 0,
> > - =C2=A0 =C2=A0 =C2=A0.access =3D PL3_RW, .fieldoffset =3D offset= of(CPUARMState,
> > cp15.esr_el[3]) },
> > + =C2=A0 =C2=A0 =C2=A0.access =3D PL3_RW, .fieldoffset =3D offset= of(CPUARMState,
> > cp15.esr_el3) },
> > =C2=A0 =C2=A0 =C2=A0{ .name =3D "FAR_EL3", .state =3D A= RM_CP_STATE_AA64,
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0.opc0 =3D 3, .opc1 =3D 6, .crn =3D 6, = .crm =3D 0, .opc2 =3D 0,
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0.access =3D PL3_RW, .fieldoffset =3D o= ffsetof(CPUARMState,
> > cp15.far_el[3]) },
> > @@ -3847,11 +3848,11 @@ void arm_cpu_do_interrupt(CPUState *cs) > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0offset =3D 4;
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
> > =C2=A0 =C2=A0 =C2=A0case EXCP_DATA_ABORT:
> > - =C2=A0 =C2=A0 =C2=A0 =C2=A0env->cp15.esr_el[1] =3D env->e= xception.fsr;
> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0A32_BANKED_CURRENT_REG_SET(env, dfsr= , env->exception.fsr);
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0env->cp15.far_el[1] =3D depo= sit64(env->cp15.far_el[1], 0, 32,
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0env->exception.vaddress);
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0qemu_log_mask(CPU_LOG_INT, &quo= t;...with DFSR 0x%x DFAR 0x%x\n",
> > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0(uint32_t)env->cp15.esr_el[1],
> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0env->exception.fsr,
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0(uint32_t)env->exception.vaddress);
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0new_mode =3D ARM_CPU_MODE_ABT;<= br> > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0addr =3D 0x10;
> > --
> > 1.8.3.2
> >
> >

--001a113a9d5a1c550004fc83ae97--