Message ID | 1407500294-10804-7-git-send-email-peter.maydell@linaro.org |
---|---|
State | Superseded |
Headers | show
Return-Path: <patchwork-forward+bncBC6Z756YVMIBBTMCSOPQKGQEF2V2XVI@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f200.google.com (mail-yk0-f200.google.com [209.85.160.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3676821457 for <linaro@patches.linaro.org>; Fri, 8 Aug 2014 12:23:41 +0000 (UTC) Received: by mail-yk0-f200.google.com with SMTP id 9sf16542658ykp.11 for <linaro@patches.linaro.org>; Fri, 08 Aug 2014 05:23:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=XWZ+KZpKxf6l5hGH19yc938l5gJzOgXCtf71EmQRWkE=; b=mycg3qbHFt699GhmRAAZ1hW/f70QS0orKCRE05yx+02Lj8VrUv3qh7iNMI3DJLfQ0z VcKQjwCRyuHOh28FaWnB++QFTge3Q5ZfDgYQBIokWdQEwE2WGFXIt0mBhYflMVBISdnW i1vCnogluyj9uG0ZYXWA9rivWapTLmspBIBYCH8VvKOxIZLpWnBStaJpZQJGyA7c03mX uj/mpT8uW1wevLBXR/WWbbNn7L/EAdovN7t2mpn4rjcMVux3hoBw88JBh5lsilFiROJz v6zI6D3a3WyuSsEY9P5LL78G3CzSZ9AQF/nk2d0nm4+p3D1jJZN6+0WitYsprC1XhLzR K/Zg== X-Gm-Message-State: ALoCoQm0mjCxIxmAWXN/MN0CIlIUcJMFnpWxsvy8PmOXpjAGRaFFR/PVtuQ19GqzyLyNE+/pIhYi X-Received: by 10.236.157.193 with SMTP id o41mr4691604yhk.6.1407500621049; Fri, 08 Aug 2014 05:23:41 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.95.182 with SMTP id i51ls484849qge.20.gmail; Fri, 08 Aug 2014 05:23:41 -0700 (PDT) X-Received: by 10.53.6.132 with SMTP id cu4mr391009vdd.62.1407500620969; Fri, 08 Aug 2014 05:23:40 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id o11si2821152vci.77.2014.08.08.05.23.40 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 08 Aug 2014 05:23:40 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id im17so8278243vcb.3 for <patchwork-forward@linaro.org>; Fri, 08 Aug 2014 05:23:40 -0700 (PDT) X-Received: by 10.52.61.99 with SMTP id o3mr6518430vdr.46.1407500620850; Fri, 08 Aug 2014 05:23:40 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp118355vcb; Fri, 8 Aug 2014 05:23:40 -0700 (PDT) X-Received: by 10.224.223.199 with SMTP id il7mr341010qab.10.1407500620256; Fri, 08 Aug 2014 05:23:40 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id q63si10002855qga.116.2014.08.08.05.23.40 for <patch@linaro.org> (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 08 Aug 2014 05:23:40 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:50854 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1XFjCt-0000yE-Sh for patch@linaro.org; Fri, 08 Aug 2014 08:23:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58726) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <pm215@archaic.org.uk>) id 1XFj7q-0001IM-Oa for qemu-devel@nongnu.org; Fri, 08 Aug 2014 08:18:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <pm215@archaic.org.uk>) id 1XFj7p-0007Hh-Ba for qemu-devel@nongnu.org; Fri, 08 Aug 2014 08:18:26 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:48924) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <pm215@archaic.org.uk>) id 1XFj7p-0007Fb-0j for qemu-devel@nongnu.org; Fri, 08 Aug 2014 08:18:25 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from <pm215@archaic.org.uk>) id 1XFj7e-0002p6-PT; Fri, 08 Aug 2014 13:18:14 +0100 From: Peter Maydell <peter.maydell@linaro.org> To: qemu-devel@nongnu.org Date: Fri, 8 Aug 2014 13:18:09 +0100 Message-Id: <1407500294-10804-7-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1407500294-10804-1-git-send-email-peter.maydell@linaro.org> References: <1407500294-10804-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Cc: David Long <dave.long@linaro.org> Subject: [Qemu-devel] [PATCH 06/11] target-arm: Correctly handle PSTATE.SS when taking exception to AArch32 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: <patchwork-forward.linaro.org> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 |
diff --git a/target-arm/helper.c b/target-arm/helper.c index 22bf6d3..f981569 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -3550,6 +3550,10 @@ void arm_cpu_do_interrupt(CPUState *cs) addr += env->cp15.vbar_el[1]; } switch_mode (env, new_mode); + /* For exceptions taken to AArch32 we must clear the SS bit in both + * PSTATE and in the old-state value we save to SPSR_<mode>, so zero it now. + */ + env->uncached_cpsr &= ~PSTATE_SS; env->spsr = cpsr_read(env); /* Clear IT bits. */ env->condexec_bits = 0;
When an exception is taken to AArch32, we must clear the PSTATE.SS bit for the exception handler, and must also ensure that the SS bit is not set in the value saved to SPSR_<mode>. Achieve both of these aims by clearing the bit in uncached_cpsr before saving it to the SPSR. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> --- target-arm/helper.c | 4 ++++ 1 file changed, 4 insertions(+)