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 09356C001E0 for ; Sat, 29 Jul 2023 09:21:21 +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: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SEdG+etrplA0kxJCsyNBuNYAmTVblT/SbMda3ZHFVMo=; b=rIxYDRg0QWxGRk nA0jOmt3TSm0l+xiKaSsr8D9mf7AI3LlMusCB8Dsw0JjT2XZki1DbfYee/4sNnwIqDw6BM2Ky6jI6 9kPBF/9L5lXoGG1BFL29o8/16SNBc3KT76DWwZemIdjMhLDhuUUiivSDcLWK70S3JYo09hgcx887b Iz0LORcJnR4CdU7fpWXQa25nLI4rpy09st+HhnvKxxEsYFBig6+8chg4i3GG+mMeDRG/RBXtiV8nD 5gxsivBe57xWkBAaqqOPE5pglYvg4dYUMCh3QzTdTq1JJGfKWYJrtGuVCLfX3GYtJB22EJPPdk2+9 UKczx3hC/HQZNkAb4zoA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qPg8E-006vIT-2x; Sat, 29 Jul 2023 09:21:02 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qPg8D-006vI4-0f for linux-arm-kernel@lists.infradead.org; Sat, 29 Jul 2023 09:21:02 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A687E60AF7; Sat, 29 Jul 2023 09:21:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 07735C433C7; Sat, 29 Jul 2023 09:20:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690622460; bh=P33vJ7HFQ9LW1t2/TFPJKDm8qe/Qk9uj/WuqEOWZA9g=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=oIK1MiJU9ysWVx4EXsWKfhl5/ZVcCJis7mYDGTKf7Fr/CDf5/dDzeYEAaGtDgdX7W 1P4yE6A82aMR1rMPvETU6EK2kJmUNffiniKHz+Ks2WTRSUWyw7TGyXEu5dWzdRWQAl lfFwcS2MgzLGnjYTeVRUg+NqgEcq5hFZMlyoAmNXMU2AztaI2paXddroIqplUJ+5rO GaiiYlyGDGGhIELtNiKzrTqHOxk0Ub/lNtwSwk5J+mIzkwn0zKZiv1fsqSGH1r1OH6 xUtHWzQwjy1WOkn6eBhIhuvJf7Hd45GHQdcGH4u5CAAuEK7/ih5Z/+Byf36niW3z8p cVHdrHvzOSMjw== Received: from sofa.misterjones.org ([185.219.108.64] helo=wait-a-minute.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 1qPg89-000KNu-Kp; Sat, 29 Jul 2023 10:20:57 +0100 Date: Sat, 29 Jul 2023 10:20:57 +0100 Message-ID: <87edkrqdja.wl-maz@kernel.org> From: Marc Zyngier To: Oliver Upton Cc: kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Catalin Marinas , Eric Auger , Mark Brown , Mark Rutland , Will Deacon , Alexandru Elisei , Andre Przywara , Chase Conklin , Ganapatrao Kulkarni , Darren Hart , Miguel Luis , James Morse , Suzuki K Poulose , Zenghui Yu Subject: Re: [PATCH v2 19/26] KVM: arm64: nv: Add trap forwarding for HFGxTR_EL2 In-Reply-To: References: <20230728082952.959212-1-maz@kernel.org> <20230728082952.959212-20-maz@kernel.org> 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/28.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: oliver.upton@linux.dev, kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, eric.auger@redhat.com, broonie@kernel.org, mark.rutland@arm.com, will@kernel.org, alexandru.elisei@arm.com, andre.przywara@arm.com, chase.conklin@arm.com, gankulkarni@os.amperecomputing.com, darren@os.amperecomputing.com, miguel.luis@oracle.com, james.morse@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com 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-20230729_022101_350017_7A5FDAAE X-CRM114-Status: GOOD ( 19.23 ) 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, 28 Jul 2023 19:47:40 +0100, Oliver Upton wrote: > > Hey Marc, > > On Fri, Jul 28, 2023 at 09:29:45AM +0100, Marc Zyngier wrote: > > [...] > > > @@ -943,6 +1025,27 @@ void __init populate_nv_trap_config(void) > > kvm_info("nv: %ld coarse grained trap handlers\n", > > ARRAY_SIZE(encoding_to_cgt)); > > It might make sense to skip insertion of the FGT trap controls if the > system doesn't have FGT in the first place. Yup, good point. > > > + for (int i = 0; i < ARRAY_SIZE(encoding_to_fgt); i++) { > > + const struct encoding_to_trap_config *fgt = &encoding_to_fgt[i]; > > + union trap_config tc; > > + > > + tc = get_trap_config(fgt->encoding); > > + > > + WARN(tc.fgt, > > + "Duplicate FGT for sys_reg(%d, %d, %d, %d, %d)\n", > > + sys_reg_Op0(fgt->encoding), > > + sys_reg_Op1(fgt->encoding), > > + sys_reg_CRn(fgt->encoding), > > + sys_reg_CRm(fgt->encoding), > > + sys_reg_Op2(fgt->encoding)); > > Same comment here, we should just bail. Yup. I'll also turn it into a kvm_err() instead, as WARN() is too noisy (nobody needs the same stack trace 200 times). Thanks, M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel