From patchwork Fri Oct 10 16:03:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Bellows X-Patchwork-Id: 38595 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DDF41205D8 for ; Fri, 10 Oct 2014 16:05:28 +0000 (UTC) Received: by mail-la0-f71.google.com with SMTP id gi9sf2295936lab.10 for ; Fri, 10 Oct 2014 09:05:23 -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: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=fSIVpFqFoTlB9jwxR6QUcNwqJARkD/9ps0dhCCwpy1g=; b=gYCvw3hw3ZON4ReVCSKWbWh6/lpzd69JPUtFw+mh4LERqv9l2OfFY19s5M6Zg34uT6 n97NL6lzKHkxCCwMGVH6txNsDcLuqhl5Y8skCe7gqijk1GaOh7DVR8hnQqtSwL5Ha7QD V5w95RMeIqLQXiktkpM2aZnL354/WxLZ9z74Am55LY3pL6Hcw1Fi48W0EL+jpR7frwwB S1LnIalWuIXI1pylJPhAdm9HixPzjUVyXhDTgYJTJSwSd0Zho3brHHQgM0Iuc+O65PyM FulmjJGyMcU6G/bzjuSnCp2mKoxfRtJbfjMi75CjvWM0mPjaebZ6x87sRW5QmLUXGjxl 9/Qg== X-Gm-Message-State: ALoCoQkiH4qvRF4s5SUAwsJvG+YA6I6XjFN5GRauPVoBbIJ7suhh7jBClJO1Cv3eLOktT/Qty5TG X-Received: by 10.181.25.234 with SMTP id it10mr1231465wid.1.1412957123417; Fri, 10 Oct 2014 09:05:23 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.21.228 with SMTP id y4ls280055lae.76.gmail; Fri, 10 Oct 2014 09:05:23 -0700 (PDT) X-Received: by 10.112.130.226 with SMTP id oh2mr4189616lbb.100.1412957123245; Fri, 10 Oct 2014 09:05:23 -0700 (PDT) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com [209.85.215.46]) by mx.google.com with ESMTPS id p8si9969198lag.62.2014.10.10.09.05.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 10 Oct 2014 09:05:21 -0700 (PDT) Received-SPF: temperror (google.com: error in processing during lookup of patch+caf_=patchwork-forward=linaro.org@linaro.org: DNS timeout) client-ip=209.85.215.46; Received: by mail-la0-f46.google.com with SMTP id gi9so3511184lab.5 for ; Fri, 10 Oct 2014 09:05:21 -0700 (PDT) X-Received: by 10.152.28.167 with SMTP id c7mr5823783lah.27.1412957121161; Fri, 10 Oct 2014 09:05:21 -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.112.84.229 with SMTP id c5csp455739lbz; Fri, 10 Oct 2014 09:05:20 -0700 (PDT) X-Received: by 10.52.112.134 with SMTP id iq6mr2176484vdb.65.1412957119559; Fri, 10 Oct 2014 09:05:19 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 44si11753030qgo.41.2014.10.10.09.05.18 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 10 Oct 2014 09:05:19 -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]:49377 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xccgw-00080E-Eb for patch@linaro.org; Fri, 10 Oct 2014 12:05:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34855) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xccfj-0006mV-1h for qemu-devel@nongnu.org; Fri, 10 Oct 2014 12:04:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xccfe-0007xr-Du for qemu-devel@nongnu.org; Fri, 10 Oct 2014 12:04:02 -0400 Received: from mail-oi0-f52.google.com ([209.85.218.52]:48907) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xccfe-0007xE-9a for qemu-devel@nongnu.org; Fri, 10 Oct 2014 12:03:58 -0400 Received: by mail-oi0-f52.google.com with SMTP id a3so7051999oib.11 for ; Fri, 10 Oct 2014 09:03:57 -0700 (PDT) X-Received: by 10.202.134.200 with SMTP id i191mr1603872oid.114.1412957037890; Fri, 10 Oct 2014 09:03:57 -0700 (PDT) Received: from gbellows-linaro.bellowshome.net (99-179-1-128.lightspeed.austtx.sbcglobal.net. [99.179.1.128]) by mx.google.com with ESMTPSA id d6sm5382455obt.12.2014.10.10.09.03.56 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 10 Oct 2014 09:03:57 -0700 (PDT) From: Greg Bellows To: qemu-devel@nongnu.org, peter.maydell@linaro.org, serge.fdrv@gmail.com, edgar.iglesias@gmail.com, aggelerf@ethz.ch Date: Fri, 10 Oct 2014 11:03:14 -0500 Message-Id: <1412957023-11105-4-git-send-email-greg.bellows@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1412957023-11105-1-git-send-email-greg.bellows@linaro.org> References: <1412957023-11105-1-git-send-email-greg.bellows@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.218.52 Subject: [Qemu-devel] [PATCH v6 03/32] target-arm: reject switching to monitor mode 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+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: greg.bellows@linaro.org X-Original-Authentication-Results: mx.google.com; spf=temperror (google.com: error in processing during lookup of patch+caf_=patchwork-forward=linaro.org@linaro.org: DNS timeout) 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 From: Sergey Fedorov Reject switching to monitor mode from non-secure state. Signed-off-by: Sergey Fedorov Signed-off-by: Fabian Aggeler Reviewed-by: Edgar E. Iglesias Signed-off-by: Greg Bellows Reviewed-by: Peter Maydell --- target-arm/helper.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target-arm/helper.c b/target-arm/helper.c index 2669e15..d6e3b52 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -3531,6 +3531,8 @@ static int bad_mode_switch(CPUARMState *env, int mode) case ARM_CPU_MODE_IRQ: case ARM_CPU_MODE_FIQ: return 0; + case ARM_CPU_MODE_MON: + return !arm_is_secure(env); default: return 1; }