Skip to content

target/riscv: fix PMP permission checking when softmmu's TLB hits

Jim Shu qemu-devel qemu-riscv 1 version Applied

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

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 3 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3target/riscv: propagate PMP permission to TLB pagetarget/riscv/cpu_helper.c target/riscv/pmp.c target/riscv/pmp.h+125 -431 reply
2/3target/riscv: add log of PMP permission checkingtarget/riscv/cpu_helper.c+12 -00 replies
3/3target/riscv: flush TLB pages if PMP permission has been changedtarget/riscv/pmp.c+4 -01 reply

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchAlistair Francis
1/3R-b
2/3
3/3R-b

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

Read the v1 thread

Cover letter [PATCH 0/3] target/riscv: fix PMP permission checking when softmmu's TLB hits

Sorry for sending this patch set again.
The cover letter of my previous mail doesn't add cc list.
---

Current implementation of PMP permission checking only has effect when softmmu's TLB miss. PMP checking is bypassed when TLB hits because TLB page permission isn't affected by PMP permission.

To fix this issue, this patch set addes the feature to propagate PMP permission to the TLB page and flush TLB pages if PMP permission has been changed.

The patch set is tested on Zephyr RTOS userspace testsuite on QEMU riscv32 virt machine.

Jim Shu (3):
target/riscv: propagate PMP permission to TLB page target/riscv: add log of PMP permission checking target/riscv: flush TLB pages if PMP permission has been changed

 target/riscv/cpu_helper.c | 96 ++++++++++++++++++++++++++++++---------
 target/riscv/pmp.c        | 84 +++++++++++++++++++++++++---------
 target/riscv/pmp.h        |  4 +-
 3 files changed, 141 insertions(+), 43 deletions(-)
Signature · 1 line
2.30.1