From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47809) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXWn8-0007ak-7A for qemu-devel@nongnu.org; Fri, 26 Sep 2014 10:46:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XXWn3-00042u-4a for qemu-devel@nongnu.org; Fri, 26 Sep 2014 10:46:38 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:41324) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXWn2-00042F-V0 for qemu-devel@nongnu.org; Fri, 26 Sep 2014 10:46:33 -0400 Received: by mail-pa0-f45.google.com with SMTP id rd3so3522770pab.18 for ; Fri, 26 Sep 2014 07:46:27 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1411718914-6608-3-git-send-email-edgar.iglesias@gmail.com> References: <1411718914-6608-1-git-send-email-edgar.iglesias@gmail.com> <1411718914-6608-3-git-send-email-edgar.iglesias@gmail.com> From: Peter Maydell Date: Fri, 26 Sep 2014 15:46:06 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH v7 02/11] target-arm: Add SCR_EL3 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Edgar E. Iglesias" Cc: Rob Herring , Peter Crosthwaite , Fabian Aggeler , Sergey Fedorov , QEMU Developers , Alexander Graf , Greg Bellows , Paolo Bonzini , =?UTF-8?B?QWxleCBCZW5uw6ll?= , Christoffer Dall , Richard Henderson On 26 September 2014 09:08, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Signed-off-by: Edgar E. Iglesias > static uint64_t ccsidr_read(CPUARMState *env, const ARMCPRegInfo *ri) > { > ARMCPU *cpu = arm_env_get_cpu(env); > @@ -873,8 +899,8 @@ static const ARMCPRegInfo v7_cp_reginfo[] = { > .fieldoffset = offsetof(CPUARMState, cp15.vbar_el[1]), > .resetvalue = 0 }, > { .name = "SCR", .cp = 15, .crn = 1, .crm = 1, .opc1 = 0, .opc2 = 0, > - .access = PL1_RW, .fieldoffset = offsetof(CPUARMState, cp15.c1_scr), > - .resetvalue = 0, }, > + .access = PL1_RW, .fieldoffset = offsetof(CPUARMState, cp15.scr_el3), > + .resetvalue = 0, .writefn = scr_write }, > { .name = "CCSIDR", .state = ARM_CP_STATE_BOTH, > .opc0 = 3, .crn = 0, .crm = 0, .opc1 = 1, .opc2 = 0, > .access = PL1_R, .readfn = ccsidr_read, .type = ARM_CP_NO_MIGRATE }, > @@ -2314,6 +2340,11 @@ static const ARMCPRegInfo v8_el3_cp_reginfo[] = { > .access = PL3_RW, .writefn = vbar_write, > .fieldoffset = offsetof(CPUARMState, cp15.vbar_el[3]), > .resetvalue = 0 }, > + { .name = "SCR_EL3", .state = ARM_CP_STATE_AA64, > + .type = ARM_CP_NO_MIGRATE, > + .opc0 = 3, .opc1 = 6, .crn = 1, .crm = 1, .opc2 = 0, > + .access = PL3_RW, .fieldoffset = offsetoflow32(CPUARMState, cp15.scr_el3), > + .writefn = scr_write }, > REGINFO_SENTINEL > }; You've applied the "offsetoflow32" to the wrong reginfo: it goes on the one for the 32 bit reg, not the one for the 64 bit reg. Since this is a trivial thing I'm going to just fix it up as I put this patch into target-arm.next. (I don't know yet if I can put the whole series in but I'm planning to put at least the start of it in.) thanks -- PMM