Skip to content

target/riscv: Fix MEPC/SEPC bit masking

Charalampos Mitrodimas 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 Latest2 patches 4 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2target/riscv: Fix MEPC/SEPC bit masking for IALIGNtarget/riscv/csr.c target/riscv/internals.h target/riscv/op_helper.c+17 -62 replies
2/2tests/tcg/riscv64: Add test for MEPC bit maskingtests/tcg/riscv64/Makefile.softmmu-target tests/tcg/riscv64/test-mepc-masking.S+77 -01 reply

Reviews trailers per patch

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

PatchDaniel Henrique BarbozaAlistair Francis
1/2R-b R-b
2/2R-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/2] target/riscv: Fix MEPC/SEPC bit masking

This patch series fixes incorrect behavior in MEPC/SEPC CSRs where the lower bits were not properly masked according to the RISC-V specification.

The issue was discovered when vectored mode bits from STVEC were written to MEPC and not properly cleared, causing incorrect behavior on MRET.

Charalampos Mitrodimas (2):
target/riscv: Fix MEPC/SEPC bit masking for IALIGN tests/tcg/riscv64: Add test for MEPC bit masking

 target/riscv/csr.c                        |  8 +--
 target/riscv/internals.h                  | 11 ++++
 target/riscv/op_helper.c                  |  4 +-
 tests/tcg/riscv64/Makefile.softmmu-target |  4 ++
 tests/tcg/riscv64/test-mepc-masking.S     | 73 +++++++++++++++++++++++
 5 files changed, 94 insertions(+), 6 deletions(-)
 create mode 100644 tests/tcg/riscv64/test-mepc-masking.S
Signature · 1 line
2.47.2