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 7C639C52D7C for ; Wed, 21 Aug 2024 16:41:09 +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=AJCi0X/nIDuCE+9US29LaEXb3DLNdBxJAsbtqfcaSFQ=; b=j2gKu5lK05aJUllghgnTZ6A0Rc rrAwgYmZ0Lf8pR6Z/42R2g7eyTjm3zIPbPX6bEQhgjA47f33lTMX6J/4IkWDaAnM/Q02toKO6/JDm lEXxC7X2zDFWWqTGdwSK+qVMKMbvFB3EhJuCpJUKb1nrTJmMD2W09LIz/tJfP2yjpMUdc8y+VyYoH Hk8h91RdyPIAZLqfMtvnqqAiGR28dAURbBszhWGHyxBj6+rZCn7d8ihey9CVSGTp4sjmlSoxaEATQ eD9sfDXOXsOb4aXsUrle8pmduauPjREECrn52MeckVWlZ/1Htjxs3sX78dwDTVw9yzwaKWKVnOob5 vL6+QK6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgoOF-00000009nMG-2I4j; Wed, 21 Aug 2024 16:40:55 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgoNW-00000009nHT-1jGv for linux-arm-kernel@lists.infradead.org; Wed, 21 Aug 2024 16:40:11 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id D3982A41D64; Wed, 21 Aug 2024 16:40:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1F387C32781; Wed, 21 Aug 2024 16:40:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1724258409; bh=i/mb4Rdm8eNfaYVfTxUHpcRDCFr7vBDdRywXy1aBhUs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=BTPlLGzf/rOkRoEuCyFLMupInG7QL2OgmLGETnQ58eRmBS4n98NCXkUelAv6kDSRj /dDmsjnsGzfVULXN1LHRIVMGsAyCfF04ZPrEB8LeonXypLtVOMAJr6holszVqYSBxK O3uJmezyDePmzqiqs7xV1ng8uacA/ZQ9BHsP1+ls8kvpBJJK7sHYmU9S0FoyHYWzmK +qkYW4cSQOT+XQypkaXVB1+Wa2uzYOpo5s6sW4cr37YID+xaDxqgufo+Hw30LRkZyI fQnMMAcX/w7NXAgsdIkCkbmEPzj9sFnlSWE3N2vT1zqQBNlASp+/kfXesNvGrv2Qrd UlJZOe3rLuBEg== 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 1sgoNT-005fap-2M; Wed, 21 Aug 2024 17:40:07 +0100 Date: Wed, 21 Aug 2024 17:40:06 +0100 Message-ID: <86bk1lygm1.wl-maz@kernel.org> From: Marc Zyngier To: Mark Brown Cc: Oliver Upton , James Morse , Suzuki K Poulose , Catalin Marinas , Will Deacon , Joey Gouly , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/2] KVM: arm64: Control visibility of S1PIE related sysregs to userspace In-Reply-To: <5304749b-04c8-44f4-b4de-b2d0cef61169@sirena.org.uk> References: <20240821-kvm-arm64-hide-pie-regs-v1-0-08cb3c79cb57@kernel.org> <86ed6ixa32.wl-maz@kernel.org> <86cym2x7cv.wl-maz@kernel.org> <5304749b-04c8-44f4-b4de-b2d0cef61169@sirena.org.uk> 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/29.4 (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: broonie@kernel.org, oliver.upton@linux.dev, james.morse@arm.com, suzuki.poulose@arm.com, catalin.marinas@arm.com, will@kernel.org, joey.gouly@arm.com, linux-arm-kernel@lists.infradead.org, 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240821_094010_543925_1F488A25 X-CRM114-Status: GOOD ( 19.29 ) 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 Wed, 21 Aug 2024 16:19:59 +0100, Mark Brown wrote: > > On Wed, Aug 21, 2024 at 03:45:20PM +0100, Marc Zyngier wrote: > > > Ultimately, we need to revisit the way we deal with visibility, as > > adding a myriad of helpers checking a combination of features doesn't > > scale. That information should exist as a static table, just like the > > trap bits. > > Indeed, I was wondering about just adding a description of the relevant > ID register field to the sys_regs table. You'd need more than that. How would you express the visibility of TCR2_EL2? It depends on both ID_AA64PFR0_EL1.EL2==1 *and* ID_AA64MMFR3_EL1.TCRX==1. So it cannot be just a single tuple { idreg, field, value }. It needs to be an arbitrary conjunction of those. The good news is that it is a much smaller table than the monster trap routing table: it is "enum vcpu_sysreg" plus things that are synthesised (anything with a .get_user callback). M. -- Without deviation from the norm, progress is not possible.