From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 569DAC77B7C for ; Thu, 3 Jul 2025 08:46:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=BXLEBsdPJr3We9Sy0cpbSuZmobZyuZksPz6SlvacM48=; b=a11ZT1C/ro7evWNUmwwCy188y8 eKY3pVN1iHc8ziKtpIhmoSQsQu3Vvnfzz+JxGsEMFtgKFqZclsd+MvKd64GYHdNEEY8tKKaj44qMt ZYnAY1qaKjNwMIKUH54MyiPCvB0pStw/xBSLGAMRaH09jYKSUcXvZx/L0QwB8h/Wj/BpAFjYHeG7Z c1L1S86Oyu1zJFIyBO3A1Yh3Gx1Ef/+and5xkz30jxwhwXcVaZyV4DnH00aHOsMP5zcL9rtrIElFg UH6nBM10YcOR6z/G0UR/l5fZ63dUC7a64q1nsk0ngk0VagpEGZIQ0ONw2zyhOaE/jDBsiflpFM+nT Tmj9LeRQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uXFaT-0000000Aibt-2uPp; Thu, 03 Jul 2025 08:46:33 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uXFY7-0000000Ai7d-0png for linux-arm-kernel@lists.infradead.org; Thu, 03 Jul 2025 08:44:08 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 68BBC45E1A; Thu, 3 Jul 2025 08:44:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 44CB7C4CEE3; Thu, 3 Jul 2025 08:44:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1751532245; bh=HBMzhFOttPyIWUwK5cb5WZMKbe36+j/NTDCw+TRnB3c=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=P7jt3Fpb4wT5/Ob9nkRVrO45tKz0jWfnJOaEahdnMTl/gUvA2wJFpE6rX20H+gKQo chkCO+aA+/TjK/FhADXsIEZABdcr9JaDQXRyR8fn8SiqwwqInSzfS3dgQWUf7lRqQz 2WTzPSePO7112PMCguiTBca5SObSUIn51Dzjr4QSBzRBxAdeAjWyrw/Eifn7iJ1Y+V nKK78rDq8IY7ukgxfwrjyZ9nzsAX5AIrXuZ1q/8KN6gFxYfZ6qsDQVnSecTh4obtWj cE6Cw5zVQM7kmP/B5pvhpUeRG5VFqhm3RzdRAdLPjTqDq6JoAQ9yoV0wNX37Bz9/XE 0V9+iXChLACJw== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1uXFY3-00CEFo-0H; Thu, 03 Jul 2025 09:44:03 +0100 Date: Thu, 03 Jul 2025 09:44:02 +0100 Message-ID: <868ql5br59.wl-maz@kernel.org> From: Marc Zyngier To: Anshuman Khandual Cc: linux-arm-kernel@lists.infradead.org, Catalin Marinas , Will Deacon , Ryan Roberts , Mark Rutland , linux-kernel@vger.kernel.org Subject: Re: [PATCH] arm64/mm: Drop wrong writes into TCR2_EL1 In-Reply-To: <20250703050453.136871-1-anshuman.khandual@arm.com> References: <20250703050453.136871-1-anshuman.khandual@arm.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: anshuman.khandual@arm.com, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, ryan.roberts@arm.com, mark.rutland@arm.com, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250703_014407_277738_F108C267 X-CRM114-Status: GOOD ( 22.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, 03 Jul 2025 06:04:53 +0100, Anshuman Khandual wrote: > > Register X0 contains PIE_E1_ASM and should not be written into REG_TCR2_EL1 > which could have an adverse impact otherwise. This has remained undetected > till now probably because current value for PIE_E1_ASM (0xcc880e0ac0800000) > clears TCR2_EL1 which again gets set subsequently with 'tcr' after checking > for FEAT_TCRX. > > Drop this unwarranted 'msr' which is a stray change from an earlier commit. Looks like I re-introduced this when rebasing on top of 926b66e2ebc8c ("arm64: setup: name 'tcr2' register"), which did remove this line. Might be worth capturing in the commit message. > > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Ryan Roberts > Cc: Marc Zyngier > Cc: Mark Rutland > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-kernel@vger.kernel.org > Fixes: 7052e808c446 ("arm64/sysreg: Get rid of the TCR2_EL1x SysregFields") > Signed-off-by: Anshuman Khandual > --- > This patch applies on v6.16-rc4 and tested with and without FEAT_S1PIE > enabled. > > arch/arm64/mm/proc.S | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S > index 80d470aa469d..54dccfd6aa11 100644 > --- a/arch/arm64/mm/proc.S > +++ b/arch/arm64/mm/proc.S > @@ -518,7 +518,6 @@ alternative_else_nop_endif > msr REG_PIR_EL1, x0 > > orr tcr2, tcr2, TCR2_EL1_PIE > - msr REG_TCR2_EL1, x0 > > .Lskip_indirection: > Acked-by: Marc Zyngier M. -- Without deviation from the norm, progress is not possible.