From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 825BE604A4 for ; Tue, 23 Jan 2024 15:03:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706022187; cv=none; b=NVlIF1MYYlOJoy3ns/+h5nY/F58DYEZSYdq5hSm1gp9fzl0bbq0oeZbE4KFBynx4sfl1Y4gBR651z1lqCAtqbUKs/6uU7Wn9f8/ZP5we390fbES1wIzZiXpX0xZU2ImT91LQZdSgkXCvjbWHKl/8gOM3XPNs5NPIf4AFR3RL70Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706022187; c=relaxed/simple; bh=PkU6uTiW87N5zI/knDx9AK+sFqpvetRR899VjnY8FU8=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=FOeaX9BEsd/e3KGOL2bxuS6NtZyhbMUe0vU3TWP+DViwngfeAe2IlGW/Fak9GD5d2ZqypryM6oWatPghkc4CkQpxCHbslO1Kztm1cvbyiMUs3cYfMw6qDFzerShIj0cho7xMwFgq5okwTt/5ZbRXaXSB+HcjXmN2meh4V0T542U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kuY2ePkN; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kuY2ePkN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EE4FDC433B2; Tue, 23 Jan 2024 15:03:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706022187; bh=PkU6uTiW87N5zI/knDx9AK+sFqpvetRR899VjnY8FU8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=kuY2ePkNvwEIvG9Xnhyry9k8FzxiyUU7j8wJPcDSeDWLlNlJ/iYenHXCNil1NeVbm jv4DXU5ui4drNdLiaVrKuOTVIl1+LIqraqEPOMA8hp4sRE02y164ig0XVDQUouPwFm moZeGVScYYNz2I3xWrpLHPqobddTa2ETEviXkwhFDHhVg+LiOMzORzySJdYwkXeT5j AQqgHYeap9S6aZAn0Vvt60xBnuKbUzu9zGpa+/jZpWDudyqWzbx/ljVNcAxDxDWgT9 cYDdIBMKY+Oliw8PAS0fu1sgYI1bCaOoeRPNEWn/82tVSYzbkAfmCF9Nzq46KJajdy davNndLonyu1Q== 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 1rSIIp-00E0co-LT; Tue, 23 Jan 2024 15:03:04 +0000 Date: Tue, 23 Jan 2024 15:03:03 +0000 Message-ID: <86jzo0853s.wl-maz@kernel.org> From: Marc Zyngier To: Joey Gouly Cc: kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, James Morse , Suzuki K Poulose , Oliver Upton , Zenghui Yu , Catalin Marinas , Will Deacon , Mark Brown Subject: Re: [PATCH 08/25] KVM: arm64: Unify HDFG[WR]TR_GROUP FGT identifiers In-Reply-To: <20240123141433.GD1283334@e124191.cambridge.arm.com> References: <20240122201852.262057-1-maz@kernel.org> <20240122201852.262057-9-maz@kernel.org> <20240123141433.GD1283334@e124191.cambridge.arm.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/29.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: 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: joey.gouly@arm.com, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, james.morse@arm.com, suzuki.poulose@arm.com, oliver.upton@linux.dev, yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org, 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 On Tue, 23 Jan 2024 14:14:33 +0000, Joey Gouly wrote: > > Hi, > > On Mon, Jan 22, 2024 at 08:18:35PM +0000, Marc Zyngier wrote: > > There is no reason to have separate FGT group identifiers for > > the debug fine grain trapping. The sole requirement is to provide > > the *names* so that the SR_FGF() macro can do its magic of picking > > the correct bit definition. > > > > So let's alias HDFGWTR_GROUP and HDFGRTR_GROUP. > > > > Signed-off-by: Marc Zyngier > > --- > > arch/arm64/kvm/emulate-nested.c | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > diff --git a/arch/arm64/kvm/emulate-nested.c b/arch/arm64/kvm/emulate-nested.c > > index 7a4a886adb9d..8a1cfcf553a2 100644 > > --- a/arch/arm64/kvm/emulate-nested.c > > +++ b/arch/arm64/kvm/emulate-nested.c > > @@ -1010,7 +1010,7 @@ enum fgt_group_id { > > __NO_FGT_GROUP__, > > HFGxTR_GROUP, > > HDFGRTR_GROUP, > > - HDFGWTR_GROUP, > > + HDFGWTR_GROUP = HDFGRTR_GROUP, > > HFGITR_GROUP, > > HAFGRTR_GROUP, > > > > @@ -1938,7 +1938,6 @@ bool __check_nv_sr_forward(struct kvm_vcpu *vcpu) > > break; > > > > case HDFGRTR_GROUP: > > - case HDFGWTR_GROUP: > > if (is_read) > > val = __vcpu_sys_reg(vcpu, HDFGRTR_EL2); > > else > > I guess you could rename it to HDFGxTR_GROUP like for HFGxTR_GROUP but that > means changing all those tables, so I think it's fine. Not just the tables, but also the arch/arm64/tools/sysreg, which distinguishes between HDFGRTR and HDFGWTR. I'm pretty sure it isn't worth the hassle... > Reviewed-by: Joey Gouly Thanks! M. -- Without deviation from the norm, progress is not possible.