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 B59D2C7EE31 for ; Fri, 27 Jun 2025 14:12:40 +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=RBG6h9TaP1D4HjHp4It6BYw4eK2WVhHK59f1Ot1eCw0=; b=x8M55kN7yFgkjbjaYejqXthV/0 EVkIs6e79YpS/SJCayMtP02Eau01F25fvJhGdAU15D+8e+qv4PpUxPvLot53Lft1lndiPsJXMvTMp pBLOMFL9zGBrh4iHckyXmQkp5e5FQn+WfweH5bIkEQWhMNEdr5wAjTKkoS2XuvvIJatjszhUAHmTC hv97ibS41w/Z0p+RPbGCCdhAiQMgnCTUxxu+aE5oyA7U3sbQlncD1s5FLLnFjoFF0hKQEjOH37kKf eNTS+Z65+s58pTVh2doi4vYbiXkVEeYgyUlSSB1ffPctYiQRg3qBrUOKrHjtAnvjROooj874K1Jwe kYdpS4hg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uV9og-0000000Es0f-0LHw; Fri, 27 Jun 2025 14:12:34 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uV9Ab-0000000EmiI-25cr for linux-arm-kernel@lists.infradead.org; Fri, 27 Jun 2025 13:31:11 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id A719E4564A; Fri, 27 Jun 2025 13:31:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E37CC4CEE3; Fri, 27 Jun 2025 13:31:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1751031068; bh=kokEDiINvuUFaynPitaSpNI5LxY/Pe4ILkwR63ddPkc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=BibA/YEh2AeqD4S8YXr5p4aivahoY4IJa7w1Dq7LOwJv1faJXHOEDMOmKIUtHSpln F0c+9MrHEIl68ZFm0enGhAsRI934nS+8NAvRFnkwSBWE0Djh2dlkWHuCgUhKEHut9U oYhGbcGS44hjE1NUgQ/sn8QEaR4j3ZEBLDxc/zibUNM42GAupJ+/woPaAzdw6gtea8 78Y4+XMbmOBVVlVw9dEjUXTV3wBOmJJHgQardb9oMoT4l3jXIt1hBfe+qmnSwMuHLT 5zWkSgJt20xGY08P08G1u7swBwJQlYHq8zIxdrDt7AMNMitTi23rC67bEac1Csswva XLgAnyBaJTkgg== 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 1uV9AY-00AZkC-8u; Fri, 27 Jun 2025 14:31:06 +0100 Date: Fri, 27 Jun 2025 14:31:05 +0100 Message-ID: <86sejlb9ba.wl-maz@kernel.org> From: Marc Zyngier To: Colton Lewis Cc: kvm@vger.kernel.org, Paolo Bonzini , Jonathan Corbet , Russell King , Catalin Marinas , Will Deacon , Oliver Upton , Mingwei Zhang , Joey Gouly , Suzuki K Poulose , Zenghui Yu , Mark Rutland , Shuah Khan , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-perf-users@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v3 03/22] KVM: arm64: Define PMI{CNTR,FILTR}_EL0 as undef_access In-Reply-To: <20250626200459.1153955-4-coltonlewis@google.com> References: <20250626200459.1153955-1-coltonlewis@google.com> <20250626200459.1153955-4-coltonlewis@google.com> 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) 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: coltonlewis@google.com, kvm@vger.kernel.org, pbonzini@redhat.com, corbet@lwn.net, linux@armlinux.org.uk, catalin.marinas@arm.com, will@kernel.org, oliver.upton@linux.dev, mizhang@google.com, joey.gouly@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, mark.rutland@arm.com, shuah@kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-perf-users@vger.kernel.org, linux-kselftest@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-20250627_063109_580847_9B831E68 X-CRM114-Status: GOOD ( 19.89 ) 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 Thu, 26 Jun 2025 21:04:39 +0100, Colton Lewis wrote: > > Because KVM isn't fully prepared to support these yet even though the > host PMUv3 driver does, define them as undef_access for now. > > Signed-off-by: Colton Lewis > --- > arch/arm64/kvm/sys_regs.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c > index 76c2f0da821f..99fdbe174202 100644 > --- a/arch/arm64/kvm/sys_regs.c > +++ b/arch/arm64/kvm/sys_regs.c > @@ -3092,6 +3092,9 @@ static const struct sys_reg_desc sys_reg_descs[] = { > { SYS_DESC(SYS_SVCR), undef_access, reset_val, SVCR, 0, .visibility = sme_visibility }, > { SYS_DESC(SYS_FPMR), undef_access, reset_val, FPMR, 0, .visibility = fp8_visibility }, > > + { SYS_DESC(SYS_PMICNTR_EL0), undef_access }, $ jq -r --arg FEAT "FEAT_PMUv3_ICNTR" -f ./dumpfeat.jq Features.json (FEAT_PMUv3_ICNTR --> v8Ap8) (FEAT_PMUv3_ICNTR --> FEAT_PMUv3p9) ((FEAT_PMUv3_ICNTR && FEAT_AA64EL2) --> FEAT_FGT2) If you have FEAT_PMUv3_ICNTR, then you have FEAT_FGT2. If you have FEAT_FGT2, then we already trap and UNDEF PMICNTR_EL0 without any further handling since 4bc0fe0898406 ("KVM: arm64: Add sanitisation for FEAT_FGT2 registers"). > + { SYS_DESC(SYS_PMICFILTR_EL0), undef_access }, Same thing. > + > { PMU_SYS_REG(PMCR_EL0), .access = access_pmcr, .reset = reset_pmcr, > .reg = PMCR_EL0, .get_user = get_pmcr, .set_user = set_pmcr }, > { PMU_SYS_REG(PMCNTENSET_EL0), So none of this is actually required. M. -- Without deviation from the norm, progress is not possible.