[PATCH] irqchip/gic-v5: Fix inversion of IRS_IDR0.virt flag
Marc Zyngier
maz at kernel.org
Wed Feb 25 00:52:41 PST 2026
On Wed, 25 Feb 2026 08:31:40 +0000,
Sascha Bischoff <Sascha.Bischoff at 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 at 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.
More information about the linux-arm-kernel
mailing list