From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38932) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSf5A-0000n1-Lt for qemu-devel@nongnu.org; Sat, 13 Sep 2014 00:37:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XSf55-0006WA-Tr for qemu-devel@nongnu.org; Sat, 13 Sep 2014 00:37:08 -0400 Received: from mail-qc0-x22c.google.com ([2607:f8b0:400d:c01::22c]:41336) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSf55-0006W4-Q7 for qemu-devel@nongnu.org; Sat, 13 Sep 2014 00:37:03 -0400 Received: by mail-qc0-f172.google.com with SMTP id i17so1727183qcy.17 for ; Fri, 12 Sep 2014 21:37:03 -0700 (PDT) From: "Edgar E. Iglesias" Date: Sat, 13 Sep 2014 14:29:20 +1000 Message-Id: <1410582564-27687-7-git-send-email-edgar.iglesias@gmail.com> In-Reply-To: <1410582564-27687-1-git-send-email-edgar.iglesias@gmail.com> References: <1410582564-27687-1-git-send-email-edgar.iglesias@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH v6 06/10] target-arm: A64: Correct updates to FAR and ESR on exceptions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, peter.maydell@linaro.org Cc: rob.herring@linaro.org, peter.crosthwaite@xilinx.com, aggelerf@ethz.ch, agraf@suse.de, greg.bellows@linaro.org, pbonzini@redhat.com, alex.bennee@linaro.org, christoffer.dall@linaro.org, rth@twiddle.net From: "Edgar E. Iglesias" Not all exception types update both FAR and ESR. Reviewed-by: Alex Bennée Reviewed-by: Greg Bellows Signed-off-by: Edgar E. Iglesias --- target-arm/helper-a64.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/target-arm/helper-a64.c b/target-arm/helper-a64.c index 4be0784..c6ef8e9 100644 --- a/target-arm/helper-a64.c +++ b/target-arm/helper-a64.c @@ -466,18 +466,17 @@ void aarch64_cpu_do_interrupt(CPUState *cs) env->exception.syndrome); } - env->cp15.esr_el[new_el] = env->exception.syndrome; - env->cp15.far_el[new_el] = env->exception.vaddress; - switch (cs->exception_index) { case EXCP_PREFETCH_ABORT: case EXCP_DATA_ABORT: + env->cp15.far_el[new_el] = env->exception.vaddress; qemu_log_mask(CPU_LOG_INT, "...with FAR 0x%" PRIx64 "\n", env->cp15.far_el[new_el]); - break; + /* fall through */ case EXCP_BKPT: case EXCP_UDEF: case EXCP_SWI: + env->cp15.esr_el[new_el] = env->exception.syndrome; break; case EXCP_IRQ: addr += 0x80; -- 1.9.1