From patchwork Mon Oct 10 14:27:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 613754 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp2026004pvb; Mon, 10 Oct 2022 07:55:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7TAUPPkl9y9jOmVPADJSY2OlbPfSjG6y1otKLm3s9qxZuIusonYJ3gNnkKNbzeyo6rYwnY X-Received: by 2002:a05:6214:c82:b0:4b3:eef5:d117 with SMTP id r2-20020a0562140c8200b004b3eef5d117mr7357118qvr.26.1665413720443; Mon, 10 Oct 2022 07:55:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665413720; cv=none; d=google.com; s=arc-20160816; b=BaIY/E6RzyPr6USrJiPyCb64qgzTaNZwhAa30wMDLu98yXjerm/NwsSh9IbvS/reak zyV/w5GyWegyb/8YSnxgxl17ZFJn7CirlopMvyUMv05IQs02rs2koEWG2mx2hNLRLxAi 7udx79MRJKtgXrWPkJXGxQO/TthOvMud7Nx/mcT6M+l8TKsDWH+4J3hXpnrDZcOxSeNl SeKX6T+tQmjWoe0lWIZAkX2VupbB4jpyAr2P+EnQwrl/kz6hGDkv8YQ+K8TDdgG4639J O3QQzfs7M97vGLkz/7CXnTIVKkW9bxbKveQgjKMawEJ+iLnlsR5/Vq0/0IO0cz5gV3ts Ip9Q== 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:to:from :dkim-signature; bh=D9f9Ogi7C2qQwTonIlgIUzx/S6n2fOCeloaV1MSlzPc=; b=ElrTr/de1b8OwbA6MlDrR91sigCTqsT05xfPSvHpRrQTKG3T0cHIaQEwsWLg1a0he3 dCMegcHZWTznPGdyEImuNXwJnl0GKuWuDFKPd6gcncbfYo1bqy2LAOH0xGcShpLuhoG/ r0XP+LoxRWIdPFQgHDwmJZTvo83dzEWmrLB1dpWWIwBL7qBuinkymDUJ96DQVL6KcWn6 AEZYwe2Na4jprHDGyMOGTEdz4cFksHAMr17VFeG5ORZAGcL9LffPSivjVLMpFYa6Gm1K yp67rCkh91KLuuZUI4bIR/cQ2cfh6Tb5D1WJrI3My0Uu8+OlJ0xILBk1lbSK3TGoRdvw LQGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EjnOgeWY; 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 s7-20020a05620a254700b006b911975c66si5236651qko.432.2022.10.10.07.55.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Oct 2022 07:55:20 -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=EjnOgeWY; 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]:37468 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ohuBa-0007Nf-Un for patch@linaro.org; Mon, 10 Oct 2022 10:55:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52970) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohtl2-0006Nn-El for qemu-devel@nongnu.org; Mon, 10 Oct 2022 10:27:53 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:34388) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ohtl0-0005Xn-Bq for qemu-devel@nongnu.org; Mon, 10 Oct 2022 10:27:52 -0400 Received: by mail-wr1-x429.google.com with SMTP id b4so17335095wrs.1 for ; Mon, 10 Oct 2022 07:27:49 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=D9f9Ogi7C2qQwTonIlgIUzx/S6n2fOCeloaV1MSlzPc=; b=EjnOgeWYlnl5hkOgovDlUcBl4GmA4ipE+pri6PWeQ76qgeIitDEkPQPjGDF3iXPP4G E3Prm/N+Rg6yu9LE0u7liKTYb9RqolGa7xVlE30/HOoxMQ0RntAvpwoJc4CrqFY91eQd g0aidgpbO65F31IcqDfhQy2mXvYCUh1TngRpPd6gGkuBcYZwxUN2VU01gR2G3fqPA3Ut Kt5Mj7VoJVZLh/8BTgUVxlsfAESlX4wRBBl+Zcf1yN3YCYdPaP2hn4XAFvnMKfc3BU4Z K2jC+PIqfs8mrRWSLg6FtqLbY5036ONcoODiQmhQ96agcpWvSsqkXdIazIztmHZt/dpl f2xQ== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=D9f9Ogi7C2qQwTonIlgIUzx/S6n2fOCeloaV1MSlzPc=; b=MhOBBz8dqh9fXo+X5fmeyXvAr4vT0+4pUdpceXLfc/dTAGOKVPRjjO6MKfm9eQ7Rtb Vcojnc+MvGpzz1+Ly+UU2NV9wSipw4FKsclWiCDChhrZIeeKVty/5pYYh7fmr1GfHRI1 Czw3mOPoBADlcpG03Qaa32qn3B/hfBzl5BOQ3ab4DpponJ6uHDga3rhvZled77xHwWFC mYDijUSURI+jFG6BVWw9vFQnXekiWl847MmCGz+Sb9lmOf4UaartgsPCdwu9fbk6p+o9 6vPg9lmkQj62MrDRCz6hm5u9ddT+AjeqVU+cNEzo1Hye9Hov8Xf4wy6F2XxqD1POjcMr A6iA== X-Gm-Message-State: ACrzQf2rdrv5S2DOknX+hoyFHtPW+c0/wfIx92x3J+hJ3MyQtv94DGdk XJE2IpC/Q47yuLPbaVM6x6CrGQ1vMeDUGg== X-Received: by 2002:a5d:648b:0:b0:22e:ee60:db37 with SMTP id o11-20020a5d648b000000b0022eee60db37mr10261011wri.116.1665412069545; Mon, 10 Oct 2022 07:27:49 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id u6-20020adfed46000000b0022e04bfa661sm9037054wro.59.2022.10.10.07.27.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Oct 2022 07:27:49 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 16/28] target/arm: Drop secure check for HCR.TGE vs SCTLR_EL1.M Date: Mon, 10 Oct 2022 15:27:18 +0100 Message-Id: <20221010142730.502083-17-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221010142730.502083-1-peter.maydell@linaro.org> References: <20221010142730.502083-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x429.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" From: Richard Henderson 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 Message-id: 20221001162318.153420-13-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- 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 a514a78c924..b3e0db19369 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;