From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41035) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYffE-0008Gr-7U for qemu-devel@nongnu.org; Mon, 29 Sep 2014 14:27:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XYffA-0007W9-2R for qemu-devel@nongnu.org; Mon, 29 Sep 2014 14:27:12 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:54082) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYff9-0007L2-T5 for qemu-devel@nongnu.org; Mon, 29 Sep 2014 14:27:08 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1XYfew-0005ok-F6 for qemu-devel@nongnu.org; Mon, 29 Sep 2014 19:26:54 +0100 From: Peter Maydell Date: Mon, 29 Sep 2014 19:26:48 +0100 Message-Id: <1412015213-22268-15-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1412015213-22268-1-git-send-email-peter.maydell@linaro.org> References: <1412015213-22268-1-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PULL 14/19] 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 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 Message-id: 1411718914-6608-7-git-send-email-edgar.iglesias@gmail.com Signed-off-by: Peter Maydell --- 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