Skip to content

Fix some PMP implementations

Zong Li qemu-devel qemu-riscv 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest4 patches 5 repliesIn review
  2. v54 patches 4 repliesSuperseded
  3. v44 patches 2 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v33 patches4 repliesSuperseded
v22 patches1 replySuperseded
v12 patches4 repliesSuperseded

Changes in v6 from the cover letter

- Mask low 12 bits of return value of riscv_cpu_get_phys_page_debug. Suggested by Alistair Francis.

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4target/riscv: Fix the range of pmpcfg of CSR funcion tabletarget/riscv/csr.c+1 -10 replies
2/4target/riscv/pmp.c: Fix the index offset on RV64target/riscv/pmp.c+10 -10 replies
3/4target/riscv: Fix the translation of physical addresstarget/riscv/cpu_helper.c+3 -21 reply
4/4target/riscv: Change the TLB page size depends on PMP entries.target/riscv/cpu_helper.c target/riscv/pmp.c target/riscv/pmp.h+62 -24 replies

Reviews trailers per patch

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

PatchAlistair FrancisBin Meng
1/4R-b R-b
2/4R-b R-b
3/4R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [PATCH v6 0/4] Fix some PMP implementations

This patch set contains the fixes for wrong index of pmpcfg CSR on rv64, and the pmp range in CSR function table. After 3rd version of this patch series, we also fix the PMP issues such as wrong physical address translation and wrong ignoring PMP checking.

Changed in v6:
- Mask low 12 bits of return value of riscv_cpu_get_phys_page_debug. Suggested by Alistair Francis.

Changed in v5:
- Pick the suggestion which was lost in last version.

Changed in v4:
- Refine the implementation. Suggested by Bin Meng.
- Add fix for PMP checking was ignored.

Changed in v3:
- Refine the implementation. Suggested by Bin Meng.
- Add fix for wrong physical address translation.

Changed in v2:
- Move out the shifting operation from loop. Suggested by Bin Meng.

Zong Li (4):
target/riscv: Fix the range of pmpcfg of CSR funcion table target/riscv/pmp.c: Fix the index offset on RV64 target/riscv: Fix the translation of physical address target/riscv: Change the TLB page size depends on PMP entries.

 target/riscv/cpu_helper.c | 15 +++++++---
 target/riscv/csr.c        |  2 +-
 target/riscv/pmp.c        | 63 ++++++++++++++++++++++++++++++++++++++-
 target/riscv/pmp.h        |  2 ++
 4 files changed, 76 insertions(+), 6 deletions(-)
Signature · 1 line
2.27.0