From patchwork Fri Sep 26 08:08:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Edgar E. Iglesias" X-Patchwork-Id: 393560 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D300614012A for ; Fri, 26 Sep 2014 18:19:06 +1000 (EST) Received: from localhost ([::1]:45422 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXQk4-0008QN-Vi for incoming@patchwork.ozlabs.org; Fri, 26 Sep 2014 04:19:04 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38610) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXQi8-0004sb-QW for qemu-devel@nongnu.org; Fri, 26 Sep 2014 04:17:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XXQi3-00052O-Ud for qemu-devel@nongnu.org; Fri, 26 Sep 2014 04:17:04 -0400 Received: from mail-yh0-x22a.google.com ([2607:f8b0:4002:c01::22a]:37469) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXQi3-0004yL-RY for qemu-devel@nongnu.org; Fri, 26 Sep 2014 04:16:59 -0400 Received: by mail-yh0-f42.google.com with SMTP id b6so4721725yha.1 for ; Fri, 26 Sep 2014 01:16:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=aYE3dtJnJaI2M/K2d/EUPYVVixd3UaCY7LOZvwUyc7s=; b=fhHit/9a+qplR3lFMs1VoGBM2I7A7VuIlVU7ELhNB0cz+HRCZJ7lsI6GbRfpgI4dTU 78ZQfavCcJe1w4X4rla4NsLjvphNppLUIoQiACXqjAA1S7kPyPFgOmedI3u7gtwk/K51 bs6YJPaIKlEAFJXeQX34W/6OOHtDwauqebyU8gGNnQGLVQ9DMJTwvMbBZuINwSsRl+6W NFc0xK2YwNhMcrNL4UHkWHhxBqLl+uWOCBL09PB0gYPdARDLoXcARl4epBeYWkHg9/2D OaFLX5EQomyNVieR/z64+XRMIMLnqhmpd9hQXYJfuvajCJaSBm+xYQLdLkLLoE6JxU8N RUPQ== X-Received: by 10.236.183.230 with SMTP id q66mr17504169yhm.92.1411719414605; Fri, 26 Sep 2014 01:16:54 -0700 (PDT) Received: from localhost ([203.126.243.116]) by mx.google.com with ESMTPSA id 8sm2190468yhp.8.2014.09.26.01.16.52 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 26 Sep 2014 01:16:53 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org, peter.maydell@linaro.org Date: Fri, 26 Sep 2014 18:08:29 +1000 Message-Id: <1411718914-6608-7-git-send-email-edgar.iglesias@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1411718914-6608-1-git-send-email-edgar.iglesias@gmail.com> References: <1411718914-6608-1-git-send-email-edgar.iglesias@gmail.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4002:c01::22a Cc: rob.herring@linaro.org, peter.crosthwaite@xilinx.com, aggelerf@ethz.ch, serge.fdrv@gmail.com, agraf@suse.de, greg.bellows@linaro.org, pbonzini@redhat.com, alex.bennee@linaro.org, christoffer.dall@linaro.org, rth@twiddle.net Subject: [Qemu-devel] [PATCH v7 06/11] target-arm: A64: Correct updates to FAR and ESR on exceptions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@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 --- 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;