public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] irqchip/gic-v5: Fix inversion of IRS_IDR0.virt flag
@ 2026-02-25  8:31 Sascha Bischoff
  2026-02-25  8:52 ` Marc Zyngier
  2026-02-25  8:58 ` Marc Zyngier
  0 siblings, 2 replies; 3+ messages in thread
From: Sascha Bischoff @ 2026-02-25  8:31 UTC (permalink / raw)
  To: linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
	kvm@vger.kernel.org
  Cc: nd, maz@kernel.org, oliver.upton@linux.dev, Joey Gouly,
	Suzuki Poulose, yuzenghui@huawei.com

It appears that a !! became ! during a cleanup, resulting in inverted
logic when detecting if a host GICv5 implementation is capable of
virtualization.

Re-add the missing !, fixing the behaviour.

Fixes: 3227c3a89d65f ("irqchip/gic-v5: Check if impl is virt capable")
Signed-off-by: Sascha Bischoff <sascha.bischoff@arm.com>
---
 drivers/irqchip/irq-gic-v5-irs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-gic-v5-irs.c b/drivers/irqchip/irq-gic-v5-irs.c
index e518e5dfede78..f3fce0b1e25d9 100644
--- a/drivers/irqchip/irq-gic-v5-irs.c
+++ b/drivers/irqchip/irq-gic-v5-irs.c
@@ -699,7 +699,7 @@ static int __init gicv5_irs_init(struct gicv5_irs_chip_data *irs_data)
 	 */
 	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);
+		gicv5_global_data.virt_capable = !!FIELD_GET(GICV5_IRS_IDR0_VIRT, idr);
 
 		idr = irs_readl_relaxed(irs_data, GICV5_IRS_IDR1);
 		irs_setup_pri_bits(idr);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] irqchip/gic-v5: Fix inversion of IRS_IDR0.virt flag
  2026-02-25  8:31 [PATCH] irqchip/gic-v5: Fix inversion of IRS_IDR0.virt flag Sascha Bischoff
@ 2026-02-25  8:52 ` Marc Zyngier
  2026-02-25  8:58 ` Marc Zyngier
  1 sibling, 0 replies; 3+ messages in thread
From: Marc Zyngier @ 2026-02-25  8:52 UTC (permalink / raw)
  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

On Wed, 25 Feb 2026 08:31:40 +0000,
Sascha Bischoff <Sascha.Bischoff@arm.com> wrote:
> 
> It appears that a !! became ! during a cleanup, resulting in inverted
> logic when detecting if a host GICv5 implementation is capable of
> virtualization.
> 
> Re-add the missing !, fixing the behaviour.
> 
> Fixes: 3227c3a89d65f ("irqchip/gic-v5: Check if impl is virt capable")
> Signed-off-by: Sascha Bischoff <sascha.bischoff@arm.com>
> ---
>  drivers/irqchip/irq-gic-v5-irs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/irqchip/irq-gic-v5-irs.c b/drivers/irqchip/irq-gic-v5-irs.c
> index e518e5dfede78..f3fce0b1e25d9 100644
> --- a/drivers/irqchip/irq-gic-v5-irs.c
> +++ b/drivers/irqchip/irq-gic-v5-irs.c
> @@ -699,7 +699,7 @@ static int __init gicv5_irs_init(struct gicv5_irs_chip_data *irs_data)
>  	 */
>  	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);
> +		gicv5_global_data.virt_capable = !!FIELD_GET(GICV5_IRS_IDR0_VIRT, idr);
>  
>  		idr = irs_readl_relaxed(irs_data, GICV5_IRS_IDR1);
>  		irs_setup_pri_bits(idr);

Gah. Apologies for the overly eager cleanup. I'll take that in the
next batch of KVM fixes.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] irqchip/gic-v5: Fix inversion of IRS_IDR0.virt flag
  2026-02-25  8:31 [PATCH] irqchip/gic-v5: Fix inversion of IRS_IDR0.virt flag Sascha Bischoff
  2026-02-25  8:52 ` Marc Zyngier
@ 2026-02-25  8:58 ` Marc Zyngier
  1 sibling, 0 replies; 3+ messages in thread
From: Marc Zyngier @ 2026-02-25  8:58 UTC (permalink / raw)
  To: linux-arm-kernel, kvmarm, kvm, Sascha Bischoff
  Cc: nd, Joey Gouly, Suzuki Poulose, yuzenghui, Oliver Upton

On Wed, 25 Feb 2026 08:31:40 +0000, Sascha Bischoff wrote:
> It appears that a !! became ! during a cleanup, resulting in inverted
> logic when detecting if a host GICv5 implementation is capable of
> virtualization.
> 
> Re-add the missing !, fixing the behaviour.
> 
> 
> [...]

Applied to fixes, thanks!

[1/1] irqchip/gic-v5: Fix inversion of IRS_IDR0.virt flag
      commit: 29c8b85adb47daefc213381bc1831787f512d89b

Cheers,

	M.
-- 
Without deviation from the norm, progress is not possible.




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-02-25  8:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-25  8:31 [PATCH] irqchip/gic-v5: Fix inversion of IRS_IDR0.virt flag Sascha Bischoff
2026-02-25  8:52 ` Marc Zyngier
2026-02-25  8:58 ` Marc Zyngier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox