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 4D9F0CDB465 for ; Thu, 19 Oct 2023 07:15:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FsRbdf+/kUQkzA5cOnw2X/zcBPYRphWIhgHbfDk1GiI=; b=ZNX+BERSfKfokp Nnu7wMLCjbv/mlF7YgyVT6uTtnrozR7Ift1CQOeZ5POG/BDtVH5D0eLsbaiQ/OBkHKBEwKrvC0na+ NYggu/EP6mE8toEFKoy2ytNrqLgqm/kzVxR8xA0ydITmrmb8XS084uhHQdPrh+wIFTplBHpu5IGcc +MPkGubEuoCRCgPjpszUE0+rxbfqZHG4hv/ay08vDO3vUzcK50GpLMN8opXUavYb+eNnjZVc5ylAu hcyIC0td1ROB0/Txz+2lPmKYgbSkIkb9SoQ3VJxp2Wqi8HjD4VZZmUDxkVIELEdumgLJn4sWK5qZs PXQUwJvjpIsDQTLKTxaw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qtNFV-00GaTy-1G; Thu, 19 Oct 2023 07:15:17 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qtNFS-00GaSr-0X for linux-arm-kernel@lists.infradead.org; Thu, 19 Oct 2023 07:15:15 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id AFC2ACE0F7F; Thu, 19 Oct 2023 07:15:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DFD80C433C8; Thu, 19 Oct 2023 07:15:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697699710; bh=PP+R+qu15Zi7YrcYi4QBuD0RQDJPomxczNjindxBJl0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=WF2pwdCDgI3gvtTSRP8HuWN9guaMoGi7Izl/UdFp2Bee6hL+IlQ2qVl9J7cm7AgRP SJlYSSQY0ArpznUWCxPEUXbTXpdls8pXdGAMIRHFgUwbDsPLndahZyNIYnVce1FuQa CXkivjrwhYsqvp0a8A6bB0b4Xa/V4/dqq1aAX+XuN66bkic/0qgFx4mofa9HQv1acp kByR6B84yzrWjrG+RwMLWUPBxRyMkdBGEYpSDK4Q9LbTYNW9TiodIQZvKBNqrMUcjL FzIcPD4/5iV9MVB7DE4dRUds9oq8QpW+picabntLxigwYVmBKpJ8g2oBiKnUo7CnCU 6qWDFEfYhmq1A== Received: from ip-185-104-136-29.ptr.icomera.net ([185.104.136.29] helo=wait-a-minute.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 1qtNFM-005eAG-1Y; Thu, 19 Oct 2023 08:15:08 +0100 Date: Thu, 19 Oct 2023 08:15:03 +0100 Message-ID: <8734y76q2w.wl-maz@kernel.org> From: Marc Zyngier To: Anshuman Khandual Cc: linux-arm-kernel@lists.infradead.org, Catalin Marinas , Will Deacon , Oliver Upton , linux-kernel@vger.kernel.org Subject: Re: [PATCH] arm64: Independently update HDFGRTR_EL2 and HDFGWTR_EL2 In-Reply-To: References: <20231018030007.1968317-1-anshuman.khandual@arm.com> <86r0lsm7cq.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/28.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.104.136.29 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, 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-20231019_001514_579862_28EA7E5B X-CRM114-Status: GOOD ( 31.43 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, 19 Oct 2023 04:36:15 +0100, Anshuman Khandual wrote: > > > > On 10/18/23 18:10, Marc Zyngier wrote: > > On Wed, 18 Oct 2023 04:00:07 +0100, > > Anshuman Khandual wrote: > >> > >> Currently PMSNEVFR_EL1 system register read, and write access EL2 traps are > >> disabled, via setting the same bit (i.e 62) in HDFGRTR_EL2, and HDFGWTR_EL2 > >> respectively. Although very similar, bit fields are not exact same in these > >> two EL2 trap configure registers particularly when it comes to read-only or > >> write-only accesses such as ready-only 'HDFGRTR_EL2.nBRBIDR' which needs to > >> be set while enabling BRBE on NVHE platforms. Using the exact same bit mask > >> fields for both these trap register risk writing into their RESERVED areas, > >> which is undesirable. > > > > Sorry, I don't understand at all what you are describing. You seem to > > imply that the read and write effects of the FGT doesn't apply the > > same way. But my reading of the ARM ARM is that behave completely > > symmetrically. > > > > Also, what is nBRBIDR doing here? It is still set to 0. What > > 'RESERVED' state are you talking about? > > Let's observe the following example which includes the nBRBIDR problem, > mentioned earlier. > > Read access trap configure > > HDFGRTR_EL2[59] - nBRBIDR > HDFGRTR_EL2[58] - PMCEIDn_EL0 > > Write access trap configure > > HDFGWTR_EL2[59:58] - RES0 > > Because BRBIDR_EL1 and PMCEID_EL0 are read only registers they don't > have corresponding entries in HDFGWTR_EL2 for write trap configuration. > > Using the exact same value contained in 'x0' both for HDFGRTR_EL2, and > HDFGWTR_EL2 will be problematic in case it contains bit fields that are > available only in one of the registers but not in the other. > > If 'x0' contains nBRBIDR being set, it will be okay for HDFGRTR_EL2 but > might not be okay for HDFGWTR_EL2 where it will get into RESERVED areas. None of which matters for this patch. You keep arguing about something that does not exist in the change you're proposing. [...] > I should have given more details in the commit message but hope > you have some context now, but please do let me know if there > is something still missing. What is missing is a useful patch. This one just obfuscates things for no particular purpose. If you have a useful change to contribute, please send that instead (your BRBE change). We don't need an extra, standalone and pointless patch such as this one. Thanks, M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel