hw/intc: Update APLIC IDC after claiming iforce register
authorFrank Chang <frank.chang@sifive.com>
Thu, 21 Mar 2024 10:49:48 +0000 (18:49 +0800)
committerAlistair Francis <alistair.francis@wdc.com>
Fri, 22 Mar 2024 05:29:44 +0000 (15:29 +1000)
commit078189b327ae5c5727b51ec714d9663b1d0ca3df
tree624c3cd215b32fe20d8f39cf7864f4bb1fb6fefa
parent0a11629c915f61df798919db51a18ffe4649cb65
hw/intc: Update APLIC IDC after claiming iforce register

Currently, QEMU only sets the iforce register to 0 and returns early
when claiming the iforce register. However, this may leave mip.meip
remains at 1 if a spurious external interrupt triggered by iforce
register is the only pending interrupt to be claimed, and the interrupt
cannot be lowered as expected.

This commit fixes this issue by calling riscv_aplic_idc_update() to
update the IDC status after the iforce register is claimed.

Signed-off-by: Frank Chang <frank.chang@sifive.com>
Reviewed-by: Jim Shu <jim.shu@sifive.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20240321104951.12104-1-frank.chang@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
hw/intc/riscv_aplic.c