From patchwork Sat Oct 1 16:22:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 611390 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp278192pvb; Sat, 1 Oct 2022 09:40:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7Kw6DD6g7VpUY8rWNFJP3jpqECA8Afl/YRWNBhMFgWhO32xYDi5YkCFh3Ru0/pJVNTTP0O X-Received: by 2002:a05:620a:269a:b0:6cf:3f0b:8fb4 with SMTP id c26-20020a05620a269a00b006cf3f0b8fb4mr9857344qkp.100.1664642406728; Sat, 01 Oct 2022 09:40:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664642406; cv=none; d=google.com; s=arc-20160816; b=H6lYe2im8oX0785xc1S5VKr/nIfDSkWvial6GK1dzKRQeBjxbWebmVJkZj0ZPErBi6 V5uj4erNANpsgCili8iWR0TEGClXPbgk1jcA8fGEVKHmuRprBML5lhZ9oFtWKVPzTBa7 5cUdnRyvHkuVIVjvXbAbWhlzu3Tb680onf2YBJuuD8X0Qj/JJX8SV5MU7tPscadh3qzs PTQOpJCC/UrApIc0frFAO8A1LdlzuYzHhIY4qUZGrHoDPHOVCBLmmKRceuQmvM5lweuS ajbCEUzR7zNhj0P3mDBB1nqbtIwJuPA2Z/1gIwEGVUspMreKBv2SuS7tR+3L20/ni9Ds C0Tg== 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:dkim-signature; bh=XPPHU0lTWthT7ltYYV7t26jbrDU+bNcf6qqSn2mwNC8=; b=PuXwYexsBBpdv92xtm6kf63cobNBTLBYoMgdjYe9i70VD20oG/A7/ml4qVcq7f5cw6 nGs8+at3US1/P84PCgMBGOL3+W+EFVWcRGKos+1BLWxUhf/2zonPt0S3R3GaR3fDtsXy urmqXk/V3eercFfRBwl+rFNepPbVo6yI7ufUx4/efpM1/kATXzyKs/MXRKmRAjxzc778 qlqiMl3BFk+489aZbxvGKPWMxiDS5bkYvRSrYajHW6QIXM+5IksWqLcP2tcqLxzsrATW GHr7nyTcperikEcP2u/vV2FwGcYYZNUyn0xwcDs9iTPy8tJHibNh7BksmX6UlLSTL0XZ U6zQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="kCk/cnCP"; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id if1-20020a0562141c4100b00496d0f8702dsi2556191qvb.392.2022.10.01.09.40.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 01 Oct 2022 09:40:06 -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; dkim=pass header.i=@linaro.org header.s=google header.b="kCk/cnCP"; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:58226 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oefX4-0003CR-7A for patch@linaro.org; Sat, 01 Oct 2022 12:40:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33438) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oefHW-0006kV-9a for qemu-devel@nongnu.org; Sat, 01 Oct 2022 12:24:05 -0400 Received: from mail-qk1-x72a.google.com ([2607:f8b0:4864:20::72a]:42614) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oefHO-0006Gu-Dj for qemu-devel@nongnu.org; Sat, 01 Oct 2022 12:23:58 -0400 Received: by mail-qk1-x72a.google.com with SMTP id d15so4532656qka.9 for ; Sat, 01 Oct 2022 09:23:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=XPPHU0lTWthT7ltYYV7t26jbrDU+bNcf6qqSn2mwNC8=; b=kCk/cnCPZGTyn4lbeziQXU9ruNq56Sfirxfs9RebssrvtiIctRHf21YcKDxwAg/wUf HrGwpIWT7JnVohn/lroWJTkalKK51tzI35hi2wryYUaebH/7bt41XYAI1pySm6zLbRpA WBFX+RybOzHPb6D24CJUMOI8YenlOe7vbIY0/7go3bkv1CUkae0D4ZdDM1xnj8HsDnMG 9irFd3dHM8QGEYsMFxu53De9D5Pxpm/ifpJU9pq6IKRFe+Q5drQ5iFYUPU/lxCgG+Os0 GkkLm2ChrVi2JGmOG7h705xgSMYUIGKNiiZOou0hIJQNPyyzERSMT1svy9gyOGeH8vkl +U8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=XPPHU0lTWthT7ltYYV7t26jbrDU+bNcf6qqSn2mwNC8=; b=B2xyce8tP+XTz+Cxr3i/ZFMqg4OIUx6MlOL1G2QN8gmbBXe8SH5D1o+7EMDkZY2YYn T3M3tSET7kUTfxoKLsViRy3wK7Qh2KnoXohxV0jIs2oP5OSapFjUaUMYBeF243fS65VW Urjkwdiz/VuXKBFoLscVqEcAdKF0pS0uT8mr9T7k/Tw6WBK6nxljtdDAmHBEHK/TYNcc hLU9msSQm69eTNU7MH8q2OIHkz6BrMAAhAPXsTPj7YjCcbLEj0LFy3zFo5/jfN/LDR78 A7hsgFcMQWqBLawFmxnYrJA5+nt3W+PYhEtyUzFSdXhSRqRNZZRW6BVao55owHsLG3zL SDZg== X-Gm-Message-State: ACrzQf0qmj17q1tlKrZbB2VIbiyTrBLCqOJsauYX+W86NzBizDd2fWQv EaWXxxxlg/Uxhi0E6dKjvampTWol8IBDVw== X-Received: by 2002:ae9:e206:0:b0:6cb:d54d:69ee with SMTP id c6-20020ae9e206000000b006cbd54d69eemr9816891qkc.466.1664641432065; Sat, 01 Oct 2022 09:23:52 -0700 (PDT) Received: from stoup.. ([2605:ef80:8084:91a4:f7cb:db31:c505:b931]) by smtp.gmail.com with ESMTPSA id t4-20020a37ea04000000b006d1d8fdea8asm4387445qkj.85.2022.10.01.09.23.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Oct 2022 09:23:51 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Peter Maydell Subject: [PATCH v3 12/42] target/arm: Drop secure check for HCR.TGE vs SCTLR_EL1.M Date: Sat, 1 Oct 2022 09:22:48 -0700 Message-Id: <20221001162318.153420-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221001162318.153420-1-richard.henderson@linaro.org> References: <20221001162318.153420-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::72a; envelope-from=richard.henderson@linaro.org; helo=mail-qk1-x72a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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" The effect of TGE does not only apply to non-secure state, now that Secure EL2 exists. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/ptw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/ptw.c b/target/arm/ptw.c index 2875ea881c..1ea29bec58 100644 --- a/target/arm/ptw.c +++ b/target/arm/ptw.c @@ -157,8 +157,8 @@ static bool regime_translation_disabled(CPUARMState *env, ARMMMUIdx mmu_idx, case ARMMMUIdx_E10_0: case ARMMMUIdx_E10_1: case ARMMMUIdx_E10_1_PAN: - /* TGE means that NS EL0/1 act as if SCTLR_EL1.M is zero */ - if (!is_secure && (hcr_el2 & HCR_TGE)) { + /* TGE means that EL0/1 act as if SCTLR_EL1.M is zero */ + if (hcr_el2 & HCR_TGE) { return true; } break;