From patchwork Fri May 30 07:28:18 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: 353895 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 9273B1400FA for ; Fri, 30 May 2014 17:31:49 +1000 (EST) Received: from localhost ([::1]:51867 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WqHI3-00054l-Hq for incoming@patchwork.ozlabs.org; Fri, 30 May 2014 03:31:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48452) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WqHHc-0004HQ-Or for qemu-devel@nongnu.org; Fri, 30 May 2014 03:31:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WqHHW-00046o-Pw for qemu-devel@nongnu.org; Fri, 30 May 2014 03:31:20 -0400 Received: from mail-pd0-x233.google.com ([2607:f8b0:400e:c02::233]:62000) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WqHHW-00046e-I8 for qemu-devel@nongnu.org; Fri, 30 May 2014 03:31:14 -0400 Received: by mail-pd0-f179.google.com with SMTP id fp1so668455pdb.38 for ; Fri, 30 May 2014 00:31:13 -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; bh=uK3uT7HIdKFFtzxu8KKAFsDrLC0b8ZAcCgtGbm7k6xk=; b=j21lGqibIzr84ZCatD0FfdXUGTh1umngtctWm0HqQplhmjQnadU5JlDwUNhFYvbYif bhYo0z/zOiEB2ARxxp4Xw5fnfllJOS5yigRj5V+CsOwY7tMLYjbxH5dABxxEOPT4YgbK WoONbLAYCKuqPukquqiAbt43nvxp5WBqKTfQ3Db9ltI1rIbke6SH9utSAHEKI2Oy6NMI VOhCwA0+ICWH3Wq9/jp59Z2Lfzlvtk47n4PEzlC11tmJGHOQWERfLLyEZLYAwdPYuQul /c7xLucSmqDNI308tC9EYaAfpcaTH6fHlB376CpD+qaKXWlR2pXI2a2RGukBrR29QZml gixQ== X-Received: by 10.68.139.137 with SMTP id qy9mr15875829pbb.11.1401435073549; Fri, 30 May 2014 00:31:13 -0700 (PDT) Received: from localhost ([203.126.243.116]) by mx.google.com with ESMTPSA id ys1sm14686833pab.7.2014.05.30.00.31.07 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 30 May 2014 00:31:13 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org, peter.maydell@linaro.org Date: Fri, 30 May 2014 17:28:18 +1000 Message-Id: <1401434911-26992-4-git-send-email-edgar.iglesias@gmail.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1401434911-26992-1-git-send-email-edgar.iglesias@gmail.com> References: <1401434911-26992-1-git-send-email-edgar.iglesias@gmail.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c02::233 Cc: rob.herring@linaro.org, peter.crosthwaite@xilinx.com, aggelerf@ethz.ch, agraf@suse.de, blauwirbel@gmail.com, john.williams@xilinx.com, greg.bellows@linaro.org, pbonzini@redhat.com, alex.bennee@linaro.org, christoffer.dall@linaro.org, rth@twiddle.net Subject: [Qemu-devel] [PATCH v1 03/16] target-arm: A64: Respect SPSEL when taking 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" Signed-off-by: Edgar E. Iglesias Reviewed-by: Alex Bennée --- target-arm/helper-a64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target-arm/helper-a64.c b/target-arm/helper-a64.c index cccda74..bc153cb 100644 --- a/target-arm/helper-a64.c +++ b/target-arm/helper-a64.c @@ -489,8 +489,7 @@ void aarch64_cpu_do_interrupt(CPUState *cs) if (is_a64(env)) { env->banked_spsr[aarch64_banked_spsr_index(1)] = pstate_read(env); - env->sp_el[arm_current_pl(env)] = env->xregs[31]; - env->xregs[31] = env->sp_el[1]; + aarch64_save_sp(env, arm_current_pl(env)); env->elr_el[1] = env->pc; } else { env->banked_spsr[0] = cpsr_read(env); @@ -508,6 +507,7 @@ void aarch64_cpu_do_interrupt(CPUState *cs) pstate_write(env, PSTATE_DAIF | PSTATE_MODE_EL1h); env->aarch64 = 1; + aarch64_restore_sp(env, 1); env->pc = addr; cs->interrupt_request |= CPU_INTERRUPT_EXITTB;