Skip to content

target/riscv: fix CFI and envcfg CSR handling

[email protected] qemu-devel qemu-riscv 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5target/riscv: make mnstatus.MNPELP writable with Zicfilptarget/riscv/tcg/csr.c+4 -01 reply
2/5target/riscv: save ELP in MPELP for RNMI exceptionstarget/riscv/tcg/cpu_helper.c+1 -62 replies
3/5target/riscv: mask inactive senvcfg.SSE on readtarget/riscv/tcg/csr.c+8 -00 replies
4/5target/riscv: gate envcfg CBO fields on extensionstarget/riscv/tcg/csr.c+34 -41 reply
5/5target/riscv: enforce SSE precedence for ssp CSR accesstarget/riscv/tcg/csr.c+24 -50 replies

Reviews trailers per patch

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

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

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/5] target/riscv: fix CFI and envcfg CSR handling

This series fixes five independent RISC-V CSR and trap-handling defects.

The patches cover:

- making mnstatus.MNPELP writable when Zicfilp is implemented;
- saving ELP in mstatus.MPELP for M-mode RNMI exceptions;
- masking inactive senvcfg.SSE on readback;
- gating envcfg CBO fields on Zicbom and Zicboz;
- enforcing menvcfg.SSE precedence for ssp CSR access.

Each patch includes a corresponding GitLab Work Item and a Signed-off-by line. The reports were found with an automated differential/emulation tool and manually triaged against QEMU master eea8fe61b8be.

The witness families were rerun on the Linux x86_64 execution plane. The patches apply cleanly and pass git diff --check and checkpatch.pl with zero errors and zero warnings.

wangyang (5):
target/riscv: make mnstatus.MNPELP writable with Zicfilp target/riscv: save ELP in MPELP for RNMI exceptions target/riscv: mask inactive senvcfg.SSE on read target/riscv: gate envcfg CBO fields on extensions target/riscv: enforce SSE precedence for ssp CSR access

 target/riscv/tcg/cpu_helper.c |  7 +---
 target/riscv/tcg/csr.c        | 79 +++++++++++++++++++++++++++++++----
 2 files changed, 71 insertions(+), 15 deletions(-)
Signature · 1 line
2.55.0.windows.2