From: Bibo Mao Date: Wed, 13 Mar 2024 09:39:32 +0000 (+0800) Subject: hw/intc/loongarch_extioi: Fix interrupt routing update X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=0a57a96ec6532dafa961c6196a7b0c00fd28e662;p=qemu.git hw/intc/loongarch_extioi: Fix interrupt routing update Interrupt number in loop sentence should be base irq plus loop index, it is missing on checking whether the irq is pending. Fixes: 428a6ef4396 ("Add vmstate post_load support") Signed-off-by: Bibo Mao Reviewed-by: Song Gao Signed-off-by: Song Gao Message-Id: <20240313093932.2653518-1-maobibo@loongson.cn> --- diff --git a/hw/intc/loongarch_extioi.c b/hw/intc/loongarch_extioi.c index bdfa3b481e..0b358548eb 100644 --- a/hw/intc/loongarch_extioi.c +++ b/hw/intc/loongarch_extioi.c @@ -151,7 +151,7 @@ static inline void extioi_update_sw_coremap(LoongArchExtIOI *s, int irq, continue; } - if (notify && test_bit(irq, (unsigned long *)s->isr)) { + if (notify && test_bit(irq + i, (unsigned long *)s->isr)) { /* * lower irq at old cpu and raise irq at new cpu */