Skip to content

target/riscv: Smepmp fixes to match specification

Loïc Lefort qemu-devel qemu-riscv 2 versions – Applied

Status from this message: Applied to riscv-to-apply.next

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 14 repliesApplied
  2. v15 patches 7 repliesSuperseded

Changes in v2 from the cover letter

- rebased to latest riscv-to-apply.next
- addressed Daniel comments on patch 1

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/5target/riscv: pmp: don't allow RLB to bypass rule privilegestarget/riscv/pmp.c+23 -203 replies
2/5target/riscv: pmp: move Smepmp operation conversion into a functiontarget/riscv/pmp.c+12 -102 replies
3/5target/riscv: pmp: fix checks on writes to pmpcfg in Smepmp MML modetarget/riscv/pmp.c+43 -361 reply
4/5target/riscv: pmp: exit csr writes early if value was not changedtarget/riscv/pmp.c+15 -74 replies
5/5target/riscv: pmp: remove redundant check in pmp_is_lockedtarget/riscv/pmp.c+0 -52 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchDaniel Henrique BarbozaLIU ZhiweiAlistair Francis
1/5R-b R-b R-b
2/5R-b R-b R-b
3/5R-b R-b
4/5R-b R-b R-b
5/5R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/5] target/riscv: Smepmp fixes to match specification

These patches fix Smepmp implementation to make it compliant with the spec.

First patch limits RLB to CSR changes since RLB should not affect privilege evaluation. Patch 2 extracts some common code into a function (to be used in patch 3). Patch 3 fixes validation of pmpcfg CSR writes in order to match Smepmp specification. Patch 4 is a small optimization and last patch is just removing redundant code.

---
Changes in v2:
- rebased to latest riscv-to-apply.next
- addressed Daniel comments on patch 1

Link to v1:
https://lore.kernel.org/qemu-riscv/[email protected]/

Loïc Lefort (5):
target/riscv: pmp: don't allow RLB to bypass rule privileges target/riscv: pmp: move Smepmp operation conversion into a function target/riscv: pmp: fix checks on writes to pmpcfg in Smepmp MML mode target/riscv: pmp: exit csr writes early if value was not changed target/riscv: pmp: remove redundant check in pmp_is_locked

 target/riscv/pmp.c | 151 +++++++++++++++++++++++++--------------------
 1 file changed, 83 insertions(+), 68 deletions(-)
Signature · 1 line
2.47.2