From patchwork Mon Jan 22 20:18:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 13526218 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 A8E6CC47E49 for ; Mon, 22 Jan 2024 20:19:56 +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: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=n1c9x8uvSrkLHqosGL19yOBwWqKGOuvnpEi2RWZ84+o=; b=z20T/l2qwfJqC1 AKtRIwSj+xbzApJpaudgobEjL4hm4L9++wqqy7RV54BMNU9f8bRivOJhP4WVwGsqKfdN3ImNc6ea7 3JWh8M3p0KdQVLMRG2nbAFiDnRUr/zyBcZIx9MHeDixZnTmfF8k3dUbkKW3C+0r3FG9mrE8ftjMBu vO4fJ626cZFuOj98c5mQQUfV/JtBCw3yviJtruE7GdOscaihjCtCH0O98ASj0X/ouF+1jRmfOqiyC 6doivjSb3yXGR8PvnAIJz8X3KeoFCJCmSeX1xRENQ/GWyK1jU7mqLq5yOC7g0LPRHyngTkXx036sq Ha6Ap6N79rzlq4YhleXA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rS0lB-00Drz4-1X; Mon, 22 Jan 2024 20:19:09 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rS0l2-00DrrG-2Y for linux-arm-kernel@lists.infradead.org; Mon, 22 Jan 2024 20:19:02 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 5EDC361A24; Mon, 22 Jan 2024 20:18:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00961C43142; Mon, 22 Jan 2024 20:18:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705954739; bh=zJzedstPNPXZDOod74i34EIzt6/XZqUrd8Ks1qqhZvo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lB1eAio4WfngrlOFBNYKkcWD7OBCwBORkR2//OU1GrpqH9Dk2SOqJJuf3VhFSOMQN sjo0uflyvaoLTQkYhkWvYyW7dvHkW73E67j0vqW/6RxSaulGdEr0/VERVro4O4HU3J JV0dlgyKVUh8s/a3gW9+q6vPouRZJ16ZX/nFUy2uZboyfQ+mB3E7Iid4sv8/TOr9Nq SCUUWjUyjCp8D6hz86zQNJxy8RkGDWLXDj9200AB0HPwooTNc4q5OAtQZWGt/xLaiK 4ts72XpUmOctXKKjBKwcWm0BO0Y39LZnldYLx2bmT+m8osw5VZoTuuE8X5s/smZzI0 npzdKjE5BdCPg== Received: from sofa.misterjones.org ([185.219.108.64] helo=valley-girl.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1rS0kz-00DjkQ-3x; Mon, 22 Jan 2024 20:18:57 +0000 From: Marc Zyngier To: kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org Cc: James Morse , Suzuki K Poulose , Oliver Upton , Zenghui Yu , Catalin Marinas , Will Deacon , Joey Gouly , Mark Brown Subject: [PATCH 08/25] KVM: arm64: Unify HDFG[WR]TR_GROUP FGT identifiers Date: Mon, 22 Jan 2024 20:18:35 +0000 Message-Id: <20240122201852.262057-9-maz@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240122201852.262057-1-maz@kernel.org> References: <20240122201852.262057-1-maz@kernel.org> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: 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, 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-20240122_121900_880405_9495D115 X-CRM114-Status: GOOD ( 10.79 ) 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 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 Reviewed-by: Joey Gouly --- 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