]> git.proxmox.com Git - mirror_qemu.git/commit
hw/ssi: ibex_spi_host: Clear the interrupt even if disabled
authorAlistair Francis <alistair23@gmail.com>
Thu, 2 Nov 2023 00:34:23 +0000 (10:34 +1000)
committerAlistair Francis <alistair.francis@wdc.com>
Tue, 7 Nov 2023 01:06:02 +0000 (11:06 +1000)
commitd53ead72066b1502bc3989dd11f1565d472e431d
tree677f61611c4f92edb77533578bb5989341a34813
parent251385fd4480c0715f3d2c76a3c76534a42570fc
hw/ssi: ibex_spi_host: Clear the interrupt even if disabled

We currently don't clear the interrupts if they are disabled. This means
that if an interrupt occurs and the guest disables interrupts the QEMU
IRQ will remain high.

This doesn't immediately affect guests, but if the
guest re-enables interrupts it's possible that we will miss an
interrupt as it always remains set.

Let's update the logic to always call qemu_set_irq() even if the
interrupts are disabled to ensure we set the level low. The level will
never be high unless interrupts are enabled, so we won't generate
interrupts when we shouldn't.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Message-ID: <20231102003424.2003428-2-alistair.francis@wdc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
hw/ssi/ibex_spi_host.c