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 1D965C52D7C for ; Fri, 23 Aug 2024 13:43:28 +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:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From: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=u3GeGGhXiV3KCU8ZkHlXhZAwaxW+4u7XF67wakKYoRs=; b=rs3qaoJcrD1kTgDgPZVcveB3ff hWs+k+UVLmabHe7qPNJOJ5RgRO4MQc+Cj7SKMNBKx9nRrxo5d22qpeAYrOygafu1yjZHzvgy+PpDk UiXrOUe9kziJu61bQ4GPAM8u7d3CtYhPRiGPRA2sP4vYZAvvbsvwiGxigkfu6fEuMa4okdpymZQm/ QTbLr3I/V5qQ8VUpr5Mlj7qPDibo4FKelt45Yw4SNhhb3FbQf96XadvVoLB8ufC7Glz+wbd9g2+zd iWuJXmbVkCTLrz/KV8YMDsPTjN0cC7BAhLXyCrmkdkFMWWpY/fXIM4wHuaVlT+dT+BE24OWH3VDER cDrTL/1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1shUZP-0000000GvHk-4B5l; Fri, 23 Aug 2024 13:43:16 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1shUYX-0000000Guyc-0iGv for linux-arm-kernel@lists.infradead.org; Fri, 23 Aug 2024 13:42:22 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 77010602E2; Fri, 23 Aug 2024 13:42:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 56E33C32786; Fri, 23 Aug 2024 13:42:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1724420540; bh=p7ZIANVfDlXfoD29LXtd0evBx7y2j+mvpMRvoiijjDI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=diJF9KTvNtOkFxSbJXKbytkFAtignBqhPmYEolOHprLDUViiVjuKDHUVvblLiJoQK cYAq2OFQ1lC4Ob4pfq5sgJpfMW0nC0GYloyNujsF8966uVxZOtpAfbh+JXp4NFAXi6 zGYX9PXuywc/Nn2EaTGKd9Kg3OUZAfcHhEG+bSe3hFweisJRBzWLqXIhMjTnOFsE0k BYfyDcsS8zmIES3CMBMtscVY670iajmo99zrDiLGTOeSpVKhmRvfeA06Kvp3uAINuA cgeKenNlP7lid7lc7d1aVOD3AdNXVJOFk/vBTQVF0s7Q5L+YUfHHd/MdBxMETD+T+T +SkkSJYuyEi6A== Date: Fri, 23 Aug 2024 14:42:12 +0100 From: Will Deacon To: Joey Gouly Cc: linux-arm-kernel@lists.infradead.org, nd@arm.com, akpm@linux-foundation.org, aneesh.kumar@kernel.org, aneesh.kumar@linux.ibm.com, anshuman.khandual@arm.com, bp@alien8.de, broonie@kernel.org, catalin.marinas@arm.com, christophe.leroy@csgroup.eu, dave.hansen@linux.intel.com, hpa@zytor.com, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, maz@kernel.org, mingo@redhat.com, mpe@ellerman.id.au, naveen.n.rao@linux.ibm.com, npiggin@gmail.com, oliver.upton@linux.dev, shuah@kernel.org, skhan@linuxfoundation.org, szabolcs.nagy@arm.com, tglx@linutronix.de, x86@kernel.org, kvmarm@lists.linux.dev, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v5 04/30] arm64: disable trapping of POR_EL0 to EL2 Message-ID: <20240823134211.GF32156@willie-the-truck> References: <20240822151113.1479789-1-joey.gouly@arm.com> <20240822151113.1479789-5-joey.gouly@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240822151113.1479789-5-joey.gouly@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240823_064221_298385_0E50D5E5 X-CRM114-Status: GOOD ( 15.91 ) 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, Aug 22, 2024 at 04:10:47PM +0100, Joey Gouly wrote: > Allow EL0 or EL1 to access POR_EL0 without being trapped to EL2. > > Signed-off-by: Joey Gouly > Cc: Catalin Marinas > Cc: Will Deacon > Acked-by: Catalin Marinas > Reviewed-by: Anshuman Khandual > --- > arch/arm64/include/asm/el2_setup.h | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git arch/arm64/include/asm/el2_setup.h arch/arm64/include/asm/el2_setup.h > index fd87c4b8f984..212191ecad40 100644 > --- arch/arm64/include/asm/el2_setup.h > +++ arch/arm64/include/asm/el2_setup.h > @@ -185,12 +185,20 @@ > .Lset_pie_fgt_\@: > mrs_s x1, SYS_ID_AA64MMFR3_EL1 > ubfx x1, x1, #ID_AA64MMFR3_EL1_S1PIE_SHIFT, #4 > - cbz x1, .Lset_fgt_\@ > + cbz x1, .Lset_poe_fgt_\@ > > /* Disable trapping of PIR_EL1 / PIRE0_EL1 */ > orr x0, x0, #HFGxTR_EL2_nPIR_EL1 > orr x0, x0, #HFGxTR_EL2_nPIRE0_EL1 > > +.Lset_poe_fgt_\@: > + mrs_s x1, SYS_ID_AA64MMFR3_EL1 > + ubfx x1, x1, #ID_AA64MMFR3_EL1_S1POE_SHIFT, #4 > + cbz x1, .Lset_fgt_\@ > + > + /* Disable trapping of POR_EL0 */ > + orr x0, x0, #HFGxTR_EL2_nPOR_EL0 Dave's reworking the labels here on for-next/misc: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/commit/?h=for-next/misc&id=5b39db6037e7cba1659f2149aef76934370aa6d5 Please can you follow that new style for the new label so that we don't end up with an immediate inconsistency? Leave the '.Lset_fgt' label as-is and I'll fix it when we merge the branches. Cheers, Will