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 CD08FE6BF01 for ; Fri, 30 Jan 2026 11:14:25 +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=h74ZpHc54jHPI5Ry9ZdLTGqqUnBo8oWLfnDrf25XUII=; b=rVCcZnagI5wyHI9D/GJJ+ogeDk /qa1liA/mntgn909nOqR+yBO1HJOWaQ/GtDvo7MvQ8TGqvZSTyQ265Wv2Wx0RPlDTstg7JbXUnCTd Y1X1EZ+TKFFu+dIsSc1rJC9Q7qdWXSNKnz5jCcKAUfMZAKornFSgcqSaS+XEfURCakzfz4Dgb6vd3 9+1RuxawPEAmvW1RAZj08N69b4LO4/LM8bBFku83oNEnCb19UqeJhcEN8tCr4IkP/CoRc3pe6GEEv MEfLKTI49imwvl9REAVAqt9wcj2nCr52QM5EioCHCw8lR61p/U5dwRXzavOjuCDauAAd4g6YshTyp JiriHxtQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vlmSA-00000001PdK-0ddB; Fri, 30 Jan 2026 11:14:18 +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 1vlmS8-00000001Pcz-028R for linux-arm-kernel@lists.infradead.org; Fri, 30 Jan 2026 11:14:17 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 8F3D743C2F; Fri, 30 Jan 2026 11:14:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 62B70C4CEF7; Fri, 30 Jan 2026 11:14:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769771654; bh=RkCPF5y7vSOiUXky1JlxdTIgdWJ6xKp9N4kMf9l1z3I=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=KhBEM8ogaYsVlHTd3LjlzlK4vWaQvl+WjgE2Hq0PbYk8scjozn7h/UvYhfQQvRpTu 2f1Abvg99uaAPNex+LK9dypEj5ytAdDlnaY5lWk/uAeXyc66ad750J74v3jKeEue2/ s6Si80LvGMSW09uYB8nQDXNTnxHyn7ckuyDRhM/uPb9faph8vrQ/TLWMg4haO1ia8e WgIxJJH4X3+Hvglq4CEGC3hJoaFYGEd7At6tUCzoZpynRA5CL1NPWEdxt8ADgnF1DZ LZaV0SnL/kIGcpFLPq7EtoSoSpTMkNWv4CsBVC0d2EK/+0U0F4/dgVhVyFz1f/Iz1x vFSML5/99mxPw== 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.98.2) (envelope-from ) id 1vlmS4-000000072k6-1cXP; Fri, 30 Jan 2026 11:14:12 +0000 Date: Fri, 30 Jan 2026 11:14:11 +0000 Message-ID: <86343nbbek.wl-maz@kernel.org> From: Marc Zyngier To: Sascha Bischoff Cc: "linux-arm-kernel@lists.infradead.org" , "kvmarm@lists.linux.dev" , "kvm@vger.kernel.org" , nd , "oliver.upton@linux.dev" , Joey Gouly , Suzuki Poulose , "yuzenghui@huawei.com" , "peter.maydell@linaro.org" , "lpieralisi@kernel.org" , Timothy Hayes , "jonathan.cameron@huawei.com" Subject: Re: [PATCH v4 32/36] irqchip/gic-v5: Check if impl is virt capable In-Reply-To: <20260128175919.3828384-33-sascha.bischoff@arm.com> References: <20260128175919.3828384-1-sascha.bischoff@arm.com> <20260128175919.3828384-33-sascha.bischoff@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/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: Sascha.Bischoff@arm.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvm@vger.kernel.org, nd@arm.com, oliver.upton@linux.dev, Joey.Gouly@arm.com, Suzuki.Poulose@arm.com, yuzenghui@huawei.com, peter.maydell@linaro.org, lpieralisi@kernel.org, Timothy.Hayes@arm.com, jonathan.cameron@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-20260130_031416_088207_D21D8495 X-CRM114-Status: GOOD ( 21.34 ) 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 Wed, 28 Jan 2026 18:07:33 +0000, Sascha Bischoff wrote: > > Now that there is support for creating a GICv5-based guest with KVM, > check that the hardware itself supports virtualisation, skipping the > setting of struct gic_kvm_info if not. > > Note: If native GICv5 virt is not supported, then nor is > FEAT_GCIE_LEGACY, so we are able to skip altogether. > > Signed-off-by: Sascha Bischoff > Reviewed-by: Lorenzo Pieralisi > Reviewed-by: Jonathan Cameron > --- > drivers/irqchip/irq-gic-v5-irs.c | 4 ++++ > drivers/irqchip/irq-gic-v5.c | 10 ++++++++++ > include/linux/irqchip/arm-gic-v5.h | 4 ++++ > 3 files changed, 18 insertions(+) > > diff --git a/drivers/irqchip/irq-gic-v5-irs.c b/drivers/irqchip/irq-gic-v5-irs.c > index ce2732d649a3..eebf9f219ac8 100644 > --- a/drivers/irqchip/irq-gic-v5-irs.c > +++ b/drivers/irqchip/irq-gic-v5-irs.c > @@ -744,6 +744,10 @@ static int __init gicv5_irs_init(struct device_node *node) > */ > if (list_empty(&irs_nodes)) { > > + idr = irs_readl_relaxed(irs_data, GICV5_IRS_IDR0); > + gicv5_global_data.virt_capable = > + !!FIELD_GET(GICV5_IRS_IDR0_VIRT, idr); > + I'll tidy-up this while cherry-picking it (spurious newline before the hunk, horrible split assignment...). Thanks, M. -- Without deviation from the norm, progress is not possible.