Skip to content

tests/tcg/riscv64: Add system mode rvv ld/st tests

Max Chou qemu-devel qemu-riscv 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6target/riscv: Match PMP entries lying inside the checked rangetarget/riscv/tcg/pmp.c+10 -210 replies
2/6target/riscv: rvv: Probe unit-stride accesses by the first elementtarget/riscv/tcg/vector_helper.c+40 -50 replies
3/6tests/tcg/riscv64: Add vector masked fault-only-first PMP testtests/tcg/riscv64/Makefile.softmmu-target tests/tcg/riscv64/rvv-ldst.inc tests/tcg/riscv64/test-rvv-ldst-ff-pmp.S+363 -02 replies
4/6tests/tcg/riscv64: Add vector unit-stride PMP testtests/tcg/riscv64/Makefile.softmmu-target tests/tcg/riscv64/test-rvv-ldst-us-pmp.S+286 -20 replies
5/6tests/tcg/riscv64: Add vector fault-only-first page probe testtests/tcg/riscv64/Makefile.softmmu-target tests/tcg/riscv64/test-rvv-ldst-ff-page.S+90 -20 replies
6/6tests/tcg/riscv64: Add vector segment PMP region spanning testtests/tcg/riscv64/Makefile.softmmu-target tests/tcg/riscv64/test-rvv-ldst-seg-pmp.S+160 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/6] tests/tcg/riscv64: Add system mode rvv ld/st tests

Hi Richard,

This patchset adds several rvv load/store tests with PMP permission settings, as we discussed during your v1 submission.

While building the tests, I noticed that pmp_hart_has_privs has a scope issue that yields unexpected results. This affects both the vector fault-only-first load and vector unit-stride ld/st instructions. I therefore attempted to correct pmp_hart_has_privs and vext_ldst_us_notail, adding matching tests.

Hope these system mode tests and fixes can help you.

PS: I tried applying v2 <[email protected]> to the master and riscv-to-apply.next branches, but both conflicted.

Thanks,
rnax

Based-on: <[email protected]>

Max Chou (6):
target/riscv: Match PMP entries lying inside the checked range target/riscv: rvv: Probe unit-stride accesses by the first element tests/tcg/riscv64: Add vector masked fault-only-first PMP test tests/tcg/riscv64: Add vector unit-stride PMP test tests/tcg/riscv64: Add vector fault-only-first page probe test tests/tcg/riscv64: Add vector segment PMP region spanning test

 target/riscv/tcg/pmp.c                    |  31 +--
 target/riscv/tcg/vector_helper.c          |  45 +++-
 tests/tcg/riscv64/Makefile.softmmu-target |  38 +++
 tests/tcg/riscv64/rvv-ldst.inc            |  91 +++++++
 tests/tcg/riscv64/test-rvv-ldst-ff-page.S |  83 +++++++
 tests/tcg/riscv64/test-rvv-ldst-ff-pmp.S  | 259 ++++++++++++++++++++
 tests/tcg/riscv64/test-rvv-ldst-seg-pmp.S | 141 +++++++++++
 tests/tcg/riscv64/test-rvv-ldst-us-pmp.S  | 281 ++++++++++++++++++++++
 8 files changed, 943 insertions(+), 26 deletions(-)
 create mode 100644 tests/tcg/riscv64/rvv-ldst.inc
 create mode 100644 tests/tcg/riscv64/test-rvv-ldst-ff-page.S
 create mode 100644 tests/tcg/riscv64/test-rvv-ldst-ff-pmp.S
 create mode 100644 tests/tcg/riscv64/test-rvv-ldst-seg-pmp.S
 create mode 100644 tests/tcg/riscv64/test-rvv-ldst-us-pmp.S
Signature · 1 line
2.43.0