From patchwork Mon Jun 9 15:04:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Edgar E. Iglesias" X-Patchwork-Id: 357523 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 44AFB14007B for ; Tue, 10 Jun 2014 01:14:00 +1000 (EST) Received: from localhost ([::1]:33797 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wu1Go-0004A7-8c for incoming@patchwork.ozlabs.org; Mon, 09 Jun 2014 11:13:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58691) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wu1Aa-0002p8-CY for qemu-devel@nongnu.org; Mon, 09 Jun 2014 11:07:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wu1AU-0000sr-En for qemu-devel@nongnu.org; Mon, 09 Jun 2014 11:07:32 -0400 Received: from mail-qc0-x22b.google.com ([2607:f8b0:400d:c01::22b]:35029) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wu1AU-0000sl-Aw for qemu-devel@nongnu.org; Mon, 09 Jun 2014 11:07:26 -0400 Received: by mail-qc0-f171.google.com with SMTP id x13so781218qcv.16 for ; Mon, 09 Jun 2014 08:07:25 -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=hEOBbEqQK/5Jm6x5OIBWYyg/31Fj+Xe0qAJp+zvw6GnRKu1XgYK01PY+3RxQFYy7HI QyA7Rau0N09zezeYpWBf3gnALW33hejEn3xX7x1prCA6JKjqT21s5hmmy0cd7AaLyLsu T9r1JrYD8VrqHT+AGw5vYjFxxubCYKBUQkIEIlni+jCoUv8em1mD4OZnbkLPCwHsStsm 78Gq1RW3TAM8ssbCEPTHtV5qyawr9SEDIk7kG68vEgEHTLKBmXpLKtb45N8cHzIsC+BW blEA9A/XrHYC/+docO7yOqHF/SKFW8z96dUMNG1o0EfQFW8wECrgLhDUlivorZAY6rqf Ueqg== X-Received: by 10.224.13.72 with SMTP id b8mr27697055qaa.4.1402326445613; Mon, 09 Jun 2014 08:07:25 -0700 (PDT) Received: from localhost ([203.126.243.116]) by mx.google.com with ESMTPSA id 74sm11826179qgf.32.2014.06.09.08.07.18 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 09 Jun 2014 08:07:24 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org, peter.maydell@linaro.org Date: Tue, 10 Jun 2014 01:04:15 +1000 Message-Id: <1402326269-8573-4-git-send-email-edgar.iglesias@gmail.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1402326269-8573-1-git-send-email-edgar.iglesias@gmail.com> References: <1402326269-8573-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:400d:c01::22b 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 v2 03/17] 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 --- 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;