Message ID | 1390335150-13470-4-git-send-email-peter.maydell@linaro.org |
---|---|
State | Superseded |
Headers | show
Return-Path: <patchwork-forward+bncBC6Z756YVMIBBQVJ7OLAKGQEI3USBQY@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f200.google.com (mail-ve0-f200.google.com [209.85.128.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 12FCA203BE for <linaro@patches.linaro.org>; Tue, 21 Jan 2014 20:12:50 +0000 (UTC) Received: by mail-ve0-f200.google.com with SMTP id c14sf4868553vea.7 for <linaro@patches.linaro.org>; Tue, 21 Jan 2014 12:12:50 -0800 (PST) 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:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=d/LR98aJg1gwfH7Q2ZxY/81cTBOvjc42cIQxNx2diSM=; b=kpTpMM1Wsvq7MvFA17rztFw+Cvg62hV0dkbzARxCXb2O17h6ChbxPzDpDUqoAQF1ew FBqJCRnCvRJ3a48s+jytUfyGOpAaokqKEfQVYQwsoZquVOvEHYr2maySU1NXtqW6iW8R KOGMnWee4JcDIC1PSGjjGrrpIaOeIeCI88oR0lU0jSDlm0z8fkOqyEuIznbkKh4aRZSn ikWQDMg795hOgce7SnG6kIAzakwBtVaV0ZMxxFkqiupGFZXNl4cBnaLlPSPy54sMCe2s 78v5q4vhiNcI8jdFvXLQfx6TJGVWKjWOG04V1kT1qNVlDt82ioimIuTPGUwxIwM9ebGk t4Eg== X-Gm-Message-State: ALoCoQn+FANFWzm64BVGzzMCeFLE/wfL4Vp2No1YMzGMiknuLux78GlO229q9UCYp+OsAEi8mkmK X-Received: by 10.236.90.112 with SMTP id d76mr3286751yhf.49.1390335170304; Tue, 21 Jan 2014 12:12:50 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.44.102 with SMTP id f93ls1326975qga.75.gmail; Tue, 21 Jan 2014 12:12:50 -0800 (PST) X-Received: by 10.221.34.211 with SMTP id st19mr15571325vcb.5.1390335170096; Tue, 21 Jan 2014 12:12:50 -0800 (PST) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id qt5si2776619vcb.98.2014.01.21.12.12.50 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 21 Jan 2014 12:12:50 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.175; Received: by mail-ve0-f175.google.com with SMTP id c14so1572528vea.6 for <patchwork-forward@linaro.org>; Tue, 21 Jan 2014 12:12:50 -0800 (PST) X-Received: by 10.220.139.136 with SMTP id e8mr2038163vcu.34.1390335170033; Tue, 21 Jan 2014 12:12:50 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp138965vcz; Tue, 21 Jan 2014 12:12:49 -0800 (PST) X-Received: by 10.182.223.37 with SMTP id qr5mr13357421obc.41.1390335168688; Tue, 21 Jan 2014 12:12:48 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by mx.google.com with ESMTPS id p8si3600364oeq.17.2014.01.21.12.12.46 for <multiple recipients> (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 21 Jan 2014 12:12:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from <pm215@archaic.org.uk>) id 1W5hgU-0003Vv-Ta; Tue, 21 Jan 2014 20:12:30 +0000 From: Peter Maydell <peter.maydell@linaro.org> To: qemu-devel@nongnu.org Cc: patches@linaro.org, Alexander Graf <agraf@suse.de>, Michael Matz <matz@suse.de>, Claudio Fontana <claudio.fontana@linaro.org>, Dirk Mueller <dmueller@suse.de>, Laurent Desnogues <laurent.desnogues@gmail.com>, kvmarm@lists.cs.columbia.edu, Richard Henderson <rth@twiddle.net>, =?UTF-8?q?Alex=20Benn=C3=A9e?= <alex.bennee@linaro.org>, Christoffer Dall <christoffer.dall@linaro.org>, Will Newton <will.newton@linaro.org>, Peter Crosthwaite <peter.crosthwaite@xilinx.com> Subject: [PATCH 03/24] target-arm: Restrict check_ap() use of S and R bits to v6 and earlier Date: Tue, 21 Jan 2014 20:12:09 +0000 Message-Id: <1390335150-13470-4-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1390335150-13470-1-git-send-email-peter.maydell@linaro.org> References: <1390335150-13470-1-git-send-email-peter.maydell@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: <patchwork-forward.linaro.org> X-Google-Group-Id: 836684582541 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-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Unsubscribe: <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe>, <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com> |
diff --git a/target-arm/helper.c b/target-arm/helper.c index 792953e..205e36a 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -2765,6 +2765,9 @@ static inline int check_ap(CPUARMState *env, int ap, int domain_prot, switch (ap) { case 0: + if (arm_feature(env, ARM_FEATURE_V7)) { + return 0; + } if (access_type == 1) return 0; switch (env->cp15.c1_sys & (SCTLR_S | SCTLR_R)) {
The SCTLR bits S and R (8 and 9) only exist in ARMv6 and earlier. In ARMv7 these bits RAZ, and in ARMv8 they are reassigned. Guard the use of them in check_ap() so that we don't get incorrect results for ARMv8 CPUs. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> --- target-arm/helper.c | 3 +++ 1 file changed, 3 insertions(+)