All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/2] target/riscv: Fix PMP address alignment
@ 2026-05-20  6:36 Jay Chang
  2026-05-20  6:36 ` [PATCH v5 1/2] target/riscv: Align pmp size to pmp-granularity Jay Chang
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Jay Chang @ 2026-05-20  6:36 UTC (permalink / raw)
  To: qemu-devel, qemu-riscv
  Cc: Palmer Dabbelt, Alistair Francis, Weiwei Li,
	Daniel Henrique Barboza, Liu Zhiwei, Chao Liu, Jay Chang

This series fixes PMP address alignment to comply with the RISC-V
specification WARL (Write-Any, Read-Legal) semantics.

When configuring pmpcfg (TOR, NA4, or NAPOT) and pmpaddr, if the
value is smaller than the PMP granularity, it needs to be aligned
to the PMP granularity.

Chagnes in v5:
- Use uint64_t for granule, in preparation for upcoming single-binary work:
  https://lore.kernel.org/qemu-devel/20260515180437.23620-1-anjo@rev.ng/

Changes in v4:
- Rebase riscv-to-apply.next

Changes in v3:
- Use ROUND_UP() macro for NAPOT address alignment

Changes in v2:
- Fixed commit message grammar ("it needs to be aligned")
- Use ROUND_DOWN() macro for TOR address alignment to improve
  code readability

Jay Chang (2):
  target/riscv: Align pmp size to pmp-granularity
  target/riscv: Improve PMP address alignment readability

 target/riscv/pmp.c | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

-- 
2.48.1



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

end of thread, other threads:[~2026-05-26  2:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-20  6:36 [PATCH v5 0/2] target/riscv: Fix PMP address alignment Jay Chang
2026-05-20  6:36 ` [PATCH v5 1/2] target/riscv: Align pmp size to pmp-granularity Jay Chang
2026-05-20  7:05   ` Chao Liu
2026-05-20  6:36 ` [PATCH v5 2/2] target/riscv: Improve PMP address alignment readability Jay Chang
2026-05-20  7:06   ` Chao Liu
2026-05-26  2:23   ` Alistair Francis
2026-05-20  6:50 ` [PATCH v5 0/2] target/riscv: Fix PMP address alignment Philippe Mathieu-Daudé
2026-05-26  2:24 ` Alistair Francis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.