]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/intc/riscv_aplic: Expand inactive source handling for AIA target[i]
authorNikita Novikov <n.novikov@syntacore.com>
Wed, 29 Oct 2025 07:17:12 +0000 (10:17 +0300)
committerAlistair Francis <alistair.francis@wdc.com>
Fri, 9 Jan 2026 05:01:10 +0000 (15:01 +1000)
commit7c96dbdda8faf3a8318bd4e7898aa71a1c8a07b2
tree11e3f46eb6f8d5b210180dd6838cfa022ee29385
parentcfc96df65e01b339fc8b544ad56863279c80decb
hw/intc/riscv_aplic: Expand inactive source handling for AIA target[i]

According to the RISC-V AIA v1.0, section 4.5.2 ("Source configurations"),
register target[i] shall be read-only zero when interrupt source i is inactive
in this domain. A source is inactive if it is delegated to a child domain or
its source mode is INACTIVE.

The previous implementation only checked SM == INACTIVE. This patch adds
full compliance:
- Return zero on read if D == 1 or SM == INACTIVE
- Ignore writes in both cases

Fixes: b6f1244678 ("intc/riscv_aplic: Fix target register read when source is inactive")
Signed-off-by: Nikita Novikov <n.novikov@syntacore.com>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Message-ID: <20251029-n-novikov-aplic_aia_ro-v1-1-39fec74c918a@syntacore.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
hw/intc/riscv_aplic.c