Skip to content

RFC Implements RISC-V S-mode Physical Memory Protection (SPMP) and its extensions

luisccc qemu-devel qemu-riscv 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest6 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6target/riscv: Add SPMP infrastructuretarget/riscv/cpu.h target/riscv/cpu_cfg_fields.h.inc target/riscv/meson.build +2 more+603 -01 reply
2/6target/riscv: Add SPMP CSR configurationtarget/riscv/cpu_bits.h target/riscv/csr.c+76 -01 reply
3/6target/riscv: Implement extension for Sharing Hardware Resources (Smpmpdeleg)target/riscv/cpu.c target/riscv/cpu.h target/riscv/cpu_bits.h +4 more+54 -11 reply
4/6target/riscv: Implement extension for Optimizing Context Switching (Sspmpen)target/riscv/cpu_bits.h target/riscv/cpu_cfg_fields.h.inc target/riscv/csr.c +1 more+77 -11 reply
5/6target/riscv: Enable SPMP support in CPUtarget/riscv/cpu.h target/riscv/cpu_helper.c+116 -241 reply
6/6target/riscv: Add CPU properties for SPMP and sspmpentarget/riscv/cpu.c+80 -01 reply

Reviews trailers per patch

1 of 6 patches has a Reviewed-by or Acked-by.

PatchJay Chang
1/6
2/6
3/6
4/6R-b
5/6
6/6

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

Read the v1 thread

Cover letter [RFC PATCH 0/6] Implements RISC-V S-mode Physical Memory Protection (SPMP) and its extensions

This patchset adds initial support for RISC-V S-mode Physical Memory Protection (SPMP) to QEMU.

Implemented version of the specification:
https://github.com/riscv/riscv-isa-manual/tree/d539cf2fe65b02a734bf97f210474f82bd5e9393

The implementation introduces the SPMP checks to the core, CSR support, delegation handling, and CPU properties to enable SPMP and corresponding extensions.

SPMP can be enabled via:
-cpu <model>,spmp=true
Note: smpmpdeleg, sscsrind, and smcsrind also enabled.

The sspmpen extension can be enabled via:
-cpu <model>,sspmpen=true
Note: SPMP and its depedencies also enabled.

luisccc (6):
target/riscv: Add SPMP infrastructure
target/riscv: Add SPMP CSR configuration
target/riscv: Implement extension for Sharing Hardware Resources
(Smpmpdeleg)
target/riscv: Implement extension for Optimizing Context Switching
(Sspmpen)
target/riscv: Enable SPMP support in CPU
target/riscv: Add CPU properties for SPMP and sspmpen

 target/riscv/cpu.c                |  88 +++++
 target/riscv/cpu.h                |   9 +
 target/riscv/cpu_bits.h           |   9 +
 target/riscv/cpu_cfg_fields.h.inc |   3 +
 target/riscv/cpu_helper.c         | 139 ++++++--
 target/riscv/csr.c                | 167 ++++++++++
 target/riscv/meson.build          |   1 +
 target/riscv/pmp.c                |  14 +-
 target/riscv/pmp.h                |   1 +
 target/riscv/spmp.c               | 516 ++++++++++++++++++++++++++++++
 target/riscv/spmp.h               |  83 +++++
 11 files changed, 1005 insertions(+), 25 deletions(-)
 create mode 100644 target/riscv/spmp.c
 create mode 100644 target/riscv/spmp.h
Signature · 1 line
2.43.0