From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B834B31159D; Tue, 19 Aug 2025 08:29:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755592156; cv=none; b=e2J9oeVLNxploKR8Aoh8yDGSCs+tt5E7k6l2U7T7C6mevP7ZohIjYYkx2B0GSCHjJco/+ocMBENS8IykPHiWJbMjKYgxTjC3I3W0J8JUTolpZOVpZE8EKVYHwInMWOPBdpadtfjDwCS7unqkU1vOU7O+CqWFCNXrwFIKMmijISs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755592156; c=relaxed/simple; bh=sb7IXWFytjY59+7DZrrxzCX6gg12LTHilkBQwAbPXW0=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=i8X30xPP05m8O2G6upzscb1/3edeKa+XKLTX8vIi60e4PEtHvx9z4mLRC74VvJhuG+evLiZ8SZq/UR0WI4XEgu5seWAgN9KB2MhhXwXwo31Ayn0gD4SslAk/O59Id/WSpAFiT/LT8hJu2JSliPuFODtTkodvehIbbmprvrFiemw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nAPw0vPE; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nAPw0vPE" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D158C4CEF1; Tue, 19 Aug 2025 08:29:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1755592156; bh=sb7IXWFytjY59+7DZrrxzCX6gg12LTHilkBQwAbPXW0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=nAPw0vPEHV9zTl9wVPuYtFCyNNRDw38H6YnjcnVFk1I3N0mI2cxOSOIBd9OJPvRDc K4W+uoZv0PS/vqqdTEfnsS9Zy1fi52VpnoAhhHQsd6+UAvO7tFTLTLljZSsJ9PowLv x3kyxPA6nKdh9yYqio4UfY5LQsDsDmiMFmDjScleYVnlbxSNYIbK5Gj6rrcp9xXnDw p9goqfBdCjw/5FSsBtX2qhtO5NrfRyY0NkRnN2m7pXFpozJ84jkgoYzOgv1cegnwbc eqBmrMeAhtCNSsqIeCanlgRRHdPAFOKPW+UP/3oSk3XH12K8pTrwIvXNlE9maRIHVL /ldJ9ETfsbT7w== Received: from host86-149-246-145.range86-149.btcentralplus.com ([86.149.246.145] helo=lobster-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 1uoHiN-008tGS-TU; Tue, 19 Aug 2025 09:29:09 +0100 Date: Tue, 19 Aug 2025 09:29:07 +0100 Message-ID: <87tt23k94c.wl-maz@kernel.org> From: Marc Zyngier To: Anshuman Khandual Cc: linux-arm-kernel@lists.infradead.org, Catalin Marinas , Will Deacon , Oliver Upton , Mark Brown , Ryan Roberts , kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/4] arm64/sysreg: Add TCR_EL2 register In-Reply-To: References: <20250818045759.672408-1-anshuman.khandual@arm.com> <20250818045759.672408-4-anshuman.khandual@arm.com> <87ldngmy9h.wl-maz@kernel.org> 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) Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 86.149.246.145 X-SA-Exim-Rcpt-To: anshuman.khandual@arm.com, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, oliver.upton@linux.dev, broonie@kernel.org, ryan.roberts@arm.com, kvmarm@lists.linux.dev, 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 On Tue, 19 Aug 2025 06:58:51 +0100, Anshuman Khandual wrote: > > On 18/08/25 9:13 PM, Marc Zyngier wrote: > > On Mon, 18 Aug 2025 05:57:58 +0100, > > Anshuman Khandual wrote: > >> > >> Add TCR_EL2 register fields as per the latest ARM ARM DDI 0487 7.B in tools > > > > 7.B??? My copy of the published ARM ARM has L.B as the version suffix. > > Right, the version is L.B instead. > > > > Also, if you got the registers from the ARM ARM, please stop doing > > so. This is terribly error prone, and likely to be incomplete, given > > that the ARM ARM lags about a year behind the published architecture. > > > > You have the BSD-licensed MRS at your disposal, please make use of it. > > I guess you are suggesting the latest layout from the XML. Sure will refer > the layout from the following description. > > https://developer.arm.com/documentation/ddi0601/2025-06/AArch64-Registers/TCR-EL2--Translation-Control-Register--EL2- This not what I have said. Read this for a start: https://developer.arm.com/documentation/ddi0601/2025-06/Proprietary-Notice?lang=en The XML is *NOT* usable to generate Linux descriptions, full stop. If you don't believe me, ask your favourite legal department. What I'm asking you to do is to: - Download https://developer.arm.com/-/cdn-downloads/permalink/Exploration-Tools-OS-Machine-Readable-Data/AARCHMRS_BSD/AARCHMRS_OPENSOURCE_A_profile-2025-06.tar.gz (which is BSD-licensed) - Parse the JSON files to *extract* the information -- not copy/paste it or write it by hand. See https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/getting-started-aarchmrs-features-json-python as an example - If you can't be bothered to write your own script, have a look at: git://git.kernel.org/pub/scm/linux/kernel/git/maz/AARCHMRS (the 'tooling' branch). [...] > > This is only the E2H==0 version of TCR_EL2. IF you are going to > > describe this register in a useful manner, then add both formats so > > that we know what we are dealing with. > > IIUC two different runtime layouts for TCR_EL2 is not possible to be > defined in current tools sysreg format. Then the tool is broken. Fix the tool. You have the same problem with CNTHCTL_EL2, for example, and turning a blind eye is not going to help. > Also one layout is not just a larger extension of the other - in > which cases we could have just defined the larger layout. > > But curious do we have use cases for bits from the other layout now ? I don't. But given what you suggested in your reply to patch #2, this would become an absolute requirement. M. -- Jazz isn't dead. It just smells funny.