qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] hw/intc/riscv_aplic: Expand AIA target[i] source handling and refactor related code
@ 2025-10-29  7:17 Nikita Novikov
  2025-10-29  7:17 ` [PATCH 1/2] hw/intc/riscv_aplic: Expand inactive source handling for AIA target[i] Nikita Novikov
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Nikita Novikov @ 2025-10-29  7:17 UTC (permalink / raw)
  To: qemu-devel
  Cc: Nikita Novikov, qemu-riscv, Palmer Dabbelt, Alistair Francis,
	Weiwei Li, Daniel Henrique Barboza, Liu Zhiwei

During the debug of APLIC I faced with the problem with target[i]
registers of source i. According to RISC-V AIA spec v1.0 ratificated on
the 12-th of March, 2025, the section 4.5.2 ("Source configurations")
says, than 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. Currently we checks the source status
only using sm == INACTIVE, but we do not check whether the source is
delegated.

This series of patches expands current active source checking and reduces
code the associated code dublication.

Signed-off-by: Nikita Novikov <n.novikov@syntacore.com>
---
Nikita Novikov (2):
      hw/intc/riscv_aplic: Expand inactive source handling for AIA target[i]
      hw/intc/riscv_aplic: Factor out source_active() and remove duplicate checks

 hw/intc/riscv_aplic.c | 66 ++++++++++++++++++++++-----------------------------
 1 file changed, 29 insertions(+), 37 deletions(-)
---
base-commit: d1bf06e8cc8197a2b18dbde820d957a51899d374
change-id: 20251028-n-novikov-aplic_aia_ro-1baa353cd672

Best regards,
-- 
Nikita Novikov <n.novikov@syntacore.com>



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-11-12  1:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-29  7:17 [PATCH 0/2] hw/intc/riscv_aplic: Expand AIA target[i] source handling and refactor related code Nikita Novikov
2025-10-29  7:17 ` [PATCH 1/2] hw/intc/riscv_aplic: Expand inactive source handling for AIA target[i] Nikita Novikov
2025-10-30 13:19   ` Daniel Henrique Barboza
2025-11-12  0:55   ` Alistair Francis
2025-10-29  7:17 ` [PATCH 2/2] hw/intc/riscv_aplic: Factor out source_active() and remove duplicate checks Nikita Novikov
2025-10-30 13:19   ` Daniel Henrique Barboza
2025-11-12  0:57   ` Alistair Francis
2025-11-12  1:06 ` [PATCH 0/2] hw/intc/riscv_aplic: Expand AIA target[i] source handling and refactor related code Alistair Francis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).