From patchwork Thu Apr 13 20:31:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 672841 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:184:0:0:0:0 with SMTP id p4csp1081840wrx; Thu, 13 Apr 2023 13:36:18 -0700 (PDT) X-Google-Smtp-Source: AKy350aXPJDz7auv9jSSJQj6S6XPUsl5s9uUfj70nlss1K5NOB9CnVyu32rd4gqINdb+MRZ7LpKg X-Received: by 2002:ac8:7dd0:0:b0:3e4:e14f:dc3c with SMTP id c16-20020ac87dd0000000b003e4e14fdc3cmr5930768qte.11.1681418178557; Thu, 13 Apr 2023 13:36:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681418178; cv=none; d=google.com; s=arc-20160816; b=B+AN4s/d4acUUWokpEH1TptnTVSoBzXXonFxneR864CAWpDDc7Xegyz4gPQzxnQLem hzGIbfYvVQ5/4GkMcFevWicBs2Kl3dAAZM0Ikb/6XhDVhFbQWZz0tRgGZm7ZPyrNa5cM Txkl8NLgTMV2kxcH2wGta3ORVRCRfYeYhlmnvpQD1RD/dUsKjK65J6dF8Vmm/L0xxeK8 Z6eatYLdQCJ2tHdec/sbQXuS2C5NaasCA4ZZxfD05aB+KCQFZ346xmhAZug5Kr4KJ9j/ vYzO0r83i/B7mKoxWD4WfZbvWoLqDfpPz69bYrjBbMCwM9dwcnPxj7Y04OnyaIIcBXjC MmoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=0uS+eDylZJsJKVdmPSEFgd1p/Um23vwAm/j4TpHg8Fw=; b=DZq+vtOrUk9c7DUZ+hoAs7Ht6py3nCPm0ehsSFc8jD06sP4KGA1YVIwv6NTc04/9lY V2XF1KsnmtPyCqdq8TQM04gfX5RAoMjYrAYA7ciBUJHfEOcgVKUY8efiKmtWI6L+dY+S 879dc0al7/+VMoM0Xs1ruUrAF19hRDLM9XBjC9CJMYxn6Sqc8J2VQKQmmwuQDK0XyRpr Y4AZ3K/Cfzzb5DKBWiJoB60UVhJ2wGnrHmxrEVkXaw3m3RAkQnnSePhTk2tX0Iq9nNi6 4QRIgX0tcuXJ6+AiEMM3O5pxxJ3BYh52TrB702tgtrtN9vw3SVIPD6NSTHq4jmthceOU IFTQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t19-20020a05620a451300b0074adf0d8894si377664qkp.226.2023.04.13.13.36.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Apr 2023 13:36:18 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pn3cq-00045M-Ib; Thu, 13 Apr 2023 16:33:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pn3cS-0003tT-MF; Thu, 13 Apr 2023 16:32:36 -0400 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pn3cG-0003lE-TB; Thu, 13 Apr 2023 16:32:36 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id DFD1B40142; Thu, 13 Apr 2023 23:31:57 +0300 (MSK) Received: from tls.msk.ru (mjt.wg.tls.msk.ru [192.168.177.130]) by tsrv.corpit.ru (Postfix) with SMTP id 66CAB223; Thu, 13 Apr 2023 23:31:56 +0300 (MSK) Received: (nullmailer pid 2344367 invoked by uid 1000); Thu, 13 Apr 2023 20:31:54 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Richard Henderson , Peter Maydell , Michael Tokarev Subject: [PATCH 18/21] target/arm: Handle m-profile in arm_is_secure Date: Thu, 13 Apr 2023 23:31:30 +0300 Message-Id: <20230413203143.2344250-18-mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230413203051.2344192-1-mjt@tls.msk.ru> References: <20230413203051.2344192-1-mjt@tls.msk.ru> MIME-Version: 1.0 Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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 From: Richard Henderson Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1421 Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-id: 20230227225832.816605-2-richard.henderson@linaro.org Signed-off-by: Peter Maydell (cherry picked from commit 9094f9551df849f68d40236092d8af3ed869d093) Signed-off-by: Michael Tokarev --- target/arm/cpu.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 9aeed3c848..a9cd7178f8 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -2407,6 +2407,9 @@ static inline bool arm_is_el3_or_mon(CPUARMState *env) /* Return true if the processor is in secure state */ static inline bool arm_is_secure(CPUARMState *env) { + if (arm_feature(env, ARM_FEATURE_M)) { + return env->v7m.secure; + } if (arm_is_el3_or_mon(env)) { return true; }