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 08342C4828E for ; Fri, 2 Feb 2024 20:15:48 +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=HYCDHeBukg4t4ZdiKVYb7rcxtJ/DWDLXz9Te9ZP+tqI=; b=TlBFP3qJK0x7Ri Vm5PQbVKZJZpgrkZYDndbjYRK3e5KchXZfr5CPAMN35OAyOXBYjhJWXoWN2n6ylpIeMk8acLCEIlC Ol1asVs8cI1jfQ97RZMkKjOirDKK/l6Dw6csU6ms7GJ+TUglyJzm5f/qnKBsZrUtdUrVgn8cQy97F cHynS1QfjitoxG5ftiIbzaFdRzbkF+GHWhaSK+GDEylwEOW++da9CeOy2OPbYoohGm5UObLrwjn9a isFlKSOhxBVA895Rj8Te1qjSg+Revwuh/wnAEwXDtbosP4fx8YS21Yql7Kx9CxZv/mehHDrr5o6rD ZnlkAJsG+7aNKI7Wn7jw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rVzwW-0000000DLYm-3owv; Fri, 02 Feb 2024 20:15:20 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rVzvy-0000000DLPA-0sDt for linux-arm-kernel@lists.infradead.org; Fri, 02 Feb 2024 20:14:48 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id B525BCE2E34; Fri, 2 Feb 2024 20:14:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2A7BC43390; Fri, 2 Feb 2024 20:14:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706904879; bh=hVOYdqH1GUxVG4986/QzVDI+5cfC4MJ+3BNRLyQCxF4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ldVNzFa0nws//VO9B7+RU9B8INYNQ/pEVRIJI3o07VsO2FPStpA7y6E+5dVCyYUsG T05on1frERdZr1I8F3iWoQFl8YBxj6HVEf/GDpkEW378URbXNk3hXKOd7GaDI8Jh1W NnNz3Jd+G+GU9CCJrfgjKvBsix2OtJ5lV6QEDDBQ11n30cbgdav4ntQhgEbRiQZsT5 0JFSTVOjvRJJxDL6s8XHwa71YTx5BiaeMG6BUsp+EhJcf+o1SOhdRqyxiJ6SZQuckg fycybPpBejL+Vrhd0thYLC1KrZdgwberXjNJuJ2edUZBLc/PKpB8v+odJaIfi3NK+1 Wqyhm7BTKhdSA== 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 1rVzvp-00HPyD-KN; Fri, 02 Feb 2024 20:14:37 +0000 Date: Fri, 02 Feb 2024 20:14:37 +0000 Message-ID: <86bk8y7hea.wl-maz@kernel.org> From: Marc Zyngier To: Oliver Upton Cc: kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, James Morse , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , Will Deacon , Joey Gouly , Mark Brown Subject: Re: [PATCH v2 06/25] KVM: arm64: nv: Add sanitising to VNCR-backed HCRX_EL2 In-Reply-To: References: <20240130204533.693853-1-maz@kernel.org> <20240130204533.693853-7-maz@kernel.org> <86h6iq7w3x.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/29.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: oliver.upton@linux.dev, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, james.morse@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org, joey.gouly@arm.com, broonie@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-20240202_121446_456827_19D20305 X-CRM114-Status: GOOD ( 19.22 ) 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 Fri, 02 Feb 2024 19:17:37 +0000, Oliver Upton wrote: > > On Fri, Feb 02, 2024 at 05:15:51PM +0000, Oliver Upton wrote: > > On Fri, Feb 02, 2024 at 02:56:50PM +0000, Marc Zyngier wrote: > > > No amount of warnings will do, because people don't give a damn. > > > > > > I'm actually in favour of something far more radical: we snapshot the > > > raw value of all the used RES0/1, and put BUILD_BUG_ON()s that fire if > > > any value has changed. They will have to touch the KVM code to fix > > > that, and we catch them red-handed. > > > > Oh I like that a lot more. > > Unsure which registers you planned to give this treatment, but all of > the ID registers we know about should probably go in this bucket too. Yup. My current plan is to simply extract all RES0/RES1 values from arch/arm64/include/generated/asm/sysreg-defs.h (currently 232 definitions), and assert on that. We can relax it for registers that don't have any RES0 or RES1 bits, but that's about it. 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