]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/intc/riscv_aplic: Fix APLIC in_clrip and clripnum write emulation
authorYong-Xuan Wang <yongxuan.wang@sifive.com>
Tue, 29 Oct 2024 08:53:47 +0000 (16:53 +0800)
committerMichael Tokarev <mjt@tls.msk.ru>
Sun, 22 Dec 2024 08:39:24 +0000 (11:39 +0300)
commitf5ee58666d66e5f4c62c56a48909e46ed66af63d
tree056a7a5acddfa17b9d40861bc304ce3006d75cea
parent56b415017c97559cd999960677942b35b07fed0f
hw/intc/riscv_aplic: Fix APLIC in_clrip and clripnum write emulation

In the section "4.7 Precise effects on interrupt-pending bits"
of the RISC-V AIA specification defines that:

"If the source mode is Level1 or Level0 and the interrupt domain
is configured in MSI delivery mode (domaincfg.DM = 1):
The pending bit is cleared whenever the rectified input value is
low, when the interrupt is forwarded by MSI, or by a relevant
write to an in_clrip register or to clripnum."

Update the riscv_aplic_set_pending() to match the spec.

Fixes: bf31cf06eb ("hw/intc/riscv_aplic: Fix setipnum_le write emulation for APLIC MSI-mode")
Signed-off-by: Yong-Xuan Wang <yongxuan.wang@sifive.com>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20241029085349.30412-1-yongxuan.wang@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
(cherry picked from commit 0d0141fadc9063e527865ee420b2baf34e306093)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/intc/riscv_aplic.c