From patchwork Mon Feb 5 10:34:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 13545190 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 7A161C4828D for ; Mon, 5 Feb 2024 10:35:31 +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=9oTpaTyxslziLA9meNjUU7sjHjoVHqmqaYYWT/1biVk=; b=Q6p//FmOJxZORJ YKwHFv/XWSoBed+bhnjqKrM1njdeVZ8kwO2jeNe13lzhWVjHTKUNTzTORjXxNLcrRa2IueKUHs53K Ew2RZgfHEFVJs3eWxMsNHLA6ua/UuMMOLxSllmZdgqgWGcou/akVE9SiAO7V1wAL+MzAbO41M0+5R 7M0oZha32/gjd+4sAxyOjv+2AfFQtqxqAOg+3Ee1pNvOc2fR5g2tvd9GHuzGOfP5+dPvjtA3nQ/NB JErr7+vKxEmyamPOefZnLd0ERQX4qt5mi4qj7SInvc9Wa3UuJqLPH7fcz5axCEBIS2MitKax9JfXQ loIV2y7mUKJq2gk4GspA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rWwJt-00000002pUe-0Sag; Mon, 05 Feb 2024 10:35:21 +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 1rWwJP-00000002p5U-3RPJ for linux-arm-kernel@lists.infradead.org; Mon, 05 Feb 2024 10:34:54 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 68756CE0D9B; Mon, 5 Feb 2024 10:34:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5BD76C43601; Mon, 5 Feb 2024 10:34:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707129288; bh=e8O8ZVOLKTFpznJo1DX6Qs4uI6A5fN19r7dzF8iVEH8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A0Ct/W8sjpfiTuxkCU6yMe2fyVhZuAGlZRNW4S6W3Ys7UGEXqi05hRuiOQqcEc1dp wd5T4uoTiJCfc3DHD6+V323/cqeq2IdWsvgUIxahyqKhS5E+94pvV8xY/1Nmn96nTS qvnmdpL3iGQlsr5FLe7qLhLNWx0CfM5S9iCM2+tttF3ECFtX3ljesdghgkVWzJLNTp +X5uLz6Hf7MphwmsA/gP898IVLu6DXEna8PYtskdf5Uz0JMZcCPibLK/gy/X1+PTNu Dvma1INGfwt6tqN37kC1A3lIWiP5g/FDnSakgE8QnRLh3PlSHQiMePR9D8up4oRewt z6Mk3t/Lh+2BQ== 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 1rWwJK-000Nc3-Ez; Mon, 05 Feb 2024 10:34:46 +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 v3 08/26] KVM: arm64: Unify HDFG[WR]TR_GROUP FGT identifiers Date: Mon, 5 Feb 2024 10:34:13 +0000 Message-Id: <20240205103431.1104133-9-maz@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240205103431.1104133-1-maz@kernel.org> References: <20240205103431.1104133-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-20240205_023452_364268_40BC6FA3 X-CRM114-Status: GOOD ( 10.83 ) 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. Reviewed-by: Joey Gouly 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