Skip to content

target/riscv: Fix mstatus.MPP related support

Weiwei Li qemu-devel qemu-riscv 3 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. v3 Latest3 patches 5 repliesApplied
  2. v22 patches 4 repliesSuperseded
  3. v12 patches 10 repliesSuperseded

Changes in v3 from the cover letter

* add patch 2 to remove PRV_H, and use PRV_RESERVED instead in some cases
* improve legalize_mpp and assert error message in patch 3

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/3target/riscv: Fix the mstatus.MPP value after executing MRETtarget/riscv/op_helper.c+2 -10 replies
2/3target/riscv: Use PRV_RESERVED instead of PRV_Htarget/riscv/cpu.h target/riscv/cpu_bits.h target/riscv/gdbstub.c +1 more+4 -42 replies
3/3target/riscv: Legalize MPP value in write_mstatustarget/riscv/cpu_helper.c target/riscv/csr.c+34 -62 replies

Reviews trailers per patch

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

PatchAlistair FrancisRichard Henderson
1/3R-b
2/3R-b R-b
3/3R-b R-b

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

Read the v3 thread

Cover letter [PATCH v3 0/3] target/riscv: Fix mstatus.MPP related support

This patchset tries to fix some problems in current implementation for mstatus.MPP

The port is available here:
https://github.com/plctlab/plct-qemu/tree/plct-mpp-fix-v3

v3:
* add patch 2 to remove PRV_H, and use PRV_RESERVED instead in some cases
* improve legalize_mpp and assert error message in patch 3

v2:
* Modify commit message and add comment to specify MPP field becomes a WARL field since priv version 1.11 in patch 2
* rebase on riscv-to-apply.next

Weiwei Li (3):
target/riscv: Fix the mstatus.MPP value after executing MRET target/riscv: Use PRV_RESERVED instead of PRV_H target/riscv: Legalize MPP value in write_mstatus

 target/riscv/cpu.h        |  2 +-
 target/riscv/cpu_bits.h   |  2 +-
 target/riscv/cpu_helper.c |  8 ++------
 target/riscv/csr.c        | 32 ++++++++++++++++++++++++++++++++
 target/riscv/gdbstub.c    |  2 +-
 target/riscv/op_helper.c  |  5 +++--
 6 files changed, 40 insertions(+), 11 deletions(-)
Signature · 1 line
2.25.1