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 96864C48291 for ; Fri, 2 Feb 2024 17:16:14 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=CRORQL4/xUarRDgCarCUFH37Z/wTv7VcfRILoOTcJSM=; b=MLk3kuHINOoedh QgA+NZIqh4dlZutzu0icR9uykDhBuR7e1412R6B17wXSm5C145j6u9aIuHsoTJx4jDZCCafe6YbfU V1TEVJHbjMsJQ0gCZRiqx6IrhXMEzLyRcy1c6XReQ2+UnZTqWkZnQQmd0Sp3Q1xF4lXfpcRzNEqtl lFLAstYG7msXTL7bNKlo6b+EoCSxLrcF5/w7MpWZj394C6YyoL8Qyp1vYK1Vau/mCyFIxFsUD+w/D 1uDpK+aaeSjL1p5+FBrEJI/coSspDMkpqdToOM3fY2IPdhrUi6/WypHje77Jx3agZUZdc8eanzSYP /xU6KooSfCw32CnUoKIA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rVx93-0000000CXlW-3j6D; Fri, 02 Feb 2024 17:16:05 +0000 Received: from out-180.mta1.migadu.com ([2001:41d0:203:375::b4]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rVx90-0000000CXk4-0Bdu for linux-arm-kernel@lists.infradead.org; Fri, 02 Feb 2024 17:16:03 +0000 Date: Fri, 2 Feb 2024 17:15:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1706894156; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=MYEBTTVaj4LjB1JsKoRT880YU/NNwVUy2fGpHIyyHCM=; b=WMQCSCocO2jpsqQyh/xPp6PEGYA54CodshsWHHeIbG62TJHb4bbXoDt1liBQ1eQkxGmf1D 3NhJI8LbyVsJJDWLjwX18D9KQ6xhMSjmAudbJxH+oopjNRytFit3YXrvuOCCzdBT1891B5 v99uJxmf4uyEzYc4SpjyKYw2uyKKolE= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Marc Zyngier 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 Message-ID: References: <20240130204533.693853-1-maz@kernel.org> <20240130204533.693853-7-maz@kernel.org> <86h6iq7w3x.wl-maz@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <86h6iq7w3x.wl-maz@kernel.org> X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240202_091602_307453_BCA31EFF X-CRM114-Status: GOOD ( 15.42 ) 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, 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. > > > > > + if (!kvm_has_feat(kvm, ID_AA64ISAR3_EL1, PACM, TRIVIAL_IMP)) > > > + res0 |= HCRX_EL2_PACMEn; > > > + if (!kvm_has_feat(kvm, ID_AA64PFR2_EL1, FPMR, IMP)) > > > + res0 |= HCRX_EL2_EnFPM; > > > + if (!kvm_has_feat(kvm, ID_AA64PFR1_EL1, GCS, IMP)) > > > + res0 |= HCRX_EL2_GCSEn; > > > + if (!kvm_has_feat(kvm, ID_AA64ISAR2_EL1, SYSREG_128, IMP)) > > > + res0 |= HCRX_EL2_EnIDCP128; > > > + if (!kvm_has_feat(kvm, ID_AA64MMFR3_EL1, ADERR, DEV_ASYNC)) > > > + res0 |= (HCRX_EL2_EnSDERR | HCRX_EL2_EnSNERR); > > > + if (!kvm_has_feat(kvm, ID_AA64PFR1_EL1, DF2, IMP)) > > > + res0 |= HCRX_EL2_TMEA; > > > + if (!kvm_has_feat(kvm, ID_AA64MMFR3_EL1, D128, IMP)) > > > + res0 |= HCRX_EL2_D128En; > > > + if (!kvm_has_feat(kvm, ID_AA64PFR1_EL1, THE, IMP)) > > > + res0 |= HCRX_EL2_PTTWI; > > > > Ok, not fair. The latest public version of the ARM ARM doesn't have any > > of this. Where are you getting it from? > > The bloody XML, from which all of this should, in theory, be extracted > without any human intervention. Sadly, it seems that we are not > allowed to do so, from what I have been told. > > The ARM ARM is, unfortunately, being quickly rendered obsolete by the > lack of updates (FEAT_THE is part of the v9.4 architecture, released > in 2022). Ah, got it. Thanks both for the reference. That really sucks though! -- Thanks, Oliver _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel