From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35589) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPXG9-0004oH-DD for qemu-devel@nongnu.org; Mon, 17 Mar 2014 09:07:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WPXG4-0004C4-VB for qemu-devel@nongnu.org; Mon, 17 Mar 2014 09:07:17 -0400 Received: from mail-la0-f48.google.com ([209.85.215.48]:53352) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPXG4-0004Bs-OU for qemu-devel@nongnu.org; Mon, 17 Mar 2014 09:07:12 -0400 Received: by mail-la0-f48.google.com with SMTP id gf5so3577078lab.21 for ; Mon, 17 Mar 2014 06:07:11 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1394134385-1727-1-git-send-email-peter.maydell@linaro.org> <1394134385-1727-15-git-send-email-peter.maydell@linaro.org> From: Peter Maydell Date: Mon, 17 Mar 2014 13:06:51 +0000 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH v4 14/21] target-arm: Implement AArch64 views of fault status and data registers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite Cc: Rob Herring , Patch Tracking , Michael Matz , Claudio Fontana , Alexander Graf , "qemu-devel@nongnu.org Developers" , Laurent Desnogues , Dirk Mueller , Will Newton , =?UTF-8?B?QWxleCBCZW5uw6ll?= , "kvmarm@lists.cs.columbia.edu" , Christoffer Dall , Richard Henderson On 17 March 2014 05:30, Peter Crosthwaite wrote: > On Fri, Mar 7, 2014 at 5:32 AM, Peter Maydell wrote: >> @@ -2979,20 +2988,23 @@ void arm_cpu_do_interrupt(CPUState *cs) >> env->exception.fsr = 2; >> /* Fall through to prefetch abort. */ >> case EXCP_PREFETCH_ABORT: >> - env->cp15.c5_insn = env->exception.fsr; >> - env->cp15.c6_insn = env->exception.vaddress; >> + env->cp15.ifsr_el2 = env->exception.fsr; >> + env->cp15.far_el1 = deposit64(env->cp15.far_el1, 32, 32, >> + env->exception.vaddress); > > Is it better to just grab the CPRegInfo and pass it to raw_write() to > do the deposit dirty work? You'd have to do a hash-table lookup and it would be an odd case compared to the other registers we update here, so I think just directly depositing to the state field is simpler. thanks -- PMM