From: Jay Chang <jay.chang@sifive.com>
To: qemu-devel@nongnu.org, qemu-riscv@nongnu.org
Cc: Palmer Dabbelt <palmer@dabbelt.com>,
Alistair Francis <alistair.francis@wdc.com>,
Weiwei Li <liwei1518@gmail.com>,
Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>,
Liu Zhiwei <zhiwei_liu@linux.alibaba.com>,
Chao Liu <chao.liu.zevorn@gmail.com>,
Jay Chang <jay.chang@sifive.com>
Subject: [PATCH v4 0/2] target/riscv: Fix PMP address alignment
Date: Mon, 18 May 2026 15:07:23 +0800 [thread overview]
Message-ID: <20260518070725.9816-1-jay.chang@sifive.com> (raw)
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.
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: Use macros for PMP address alignment
target/riscv/pmp.c | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)
--
2.48.1
next reply other threads:[~2026-05-18 7:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-18 7:07 Jay Chang [this message]
2026-05-18 7:07 ` [PATCH v4 1/2] target/riscv: Align pmp size to pmp-granularity Jay Chang
2026-05-18 7:13 ` Philippe Mathieu-Daudé
2026-05-18 7:07 ` [PATCH v4 2/2] target/riscv: Use macros for PMP address alignment Jay Chang
2026-05-18 7:19 ` Philippe Mathieu-Daudé
2026-05-18 16:53 ` Daniel Henrique Barboza
2026-05-18 17:12 ` Anton Johansson via qemu development
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260518070725.9816-1-jay.chang@sifive.com \
--to=jay.chang@sifive.com \
--cc=alistair.francis@wdc.com \
--cc=chao.liu.zevorn@gmail.com \
--cc=daniel.barboza@oss.qualcomm.com \
--cc=liwei1518@gmail.com \
--cc=palmer@dabbelt.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=zhiwei_liu@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.