irqchip/gic-v5: Fix inversion of IRS_IDR0.virt flag
Subsystems (5)
PATCH 1/1 irqchip/gic-v5: Fix inversion of IRS_IDR0.virt flag
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.
--- drivers/irqchip/irq-gic-v5-irs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-gic-v5-irs.c +1 -1
@@ -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);
Signature · 1 line
2.34.1
Marc Zyngier
maintainerQuoted 18 lines · Sascha Bischoff
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 <[email protected]>--- drivers/irqchip/irq-gic-v5-irs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/irqchip/irq-gic-v5-irs.c +0
-0
drivers/irqchip/irq-gic-v5-irs.c static int __init gicv5_irs_init(struct gicv5_irs_chip_data *irs_data) · line 705
Quoted 8 lines
drivers/irqchip/irq-gic-v5-irs.c +1
-1@@ -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.
Signature · 1 line
Without deviation from the norm, progress is not possible.
Quoted 8 lines · Sascha Bischoff
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.
Signature · 1 line
Without deviation from the norm, progress is not possible.