[PATCH 0/2] tests/tcg/riscv64: Add vector load and store tests

Joel Stanley posted 2 patches 1 day, 7 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260820130223.2762-1-joel@jms.id.au
Maintainers: Palmer Dabbelt <palmer@dabbelt.com>, Alistair Francis <alistair.francis@wdc.com>, Weiwei Li <liwei1518@gmail.com>, Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, Chao Liu <chao.liu@processmission.com>
tests/tcg/riscv64/test-rvv-ldst-intrinsics.c |  66 ++++++++++
tests/tcg/riscv64/Makefile.target            |  19 +++
tests/tcg/riscv64/test-rvv-ldst.S            | 131 +++++++++++++++++++
3 files changed, 216 insertions(+)
create mode 100644 tests/tcg/riscv64/test-rvv-ldst-intrinsics.c
create mode 100644 tests/tcg/riscv64/test-rvv-ldst.S
[PATCH 0/2] tests/tcg/riscv64: Add vector load and store tests
Posted by Joel Stanley 1 day, 7 hours ago
Hi Richard, I was testing your riscv vector load/store series and
noticed there were some regressions with page crossing loads and stores.
We don't have any tests for that in the tree, so I wrote some.

The tests trigger assertions in linux-user for me:

  $ make -C build/tests/tcg/riscv64-linux-user run-test-rvv-ldst
  make: Entering directory 'build/tests/tcg/riscv64-linux-user'
    TEST    test-rvv-ldst on riscv64
  **
  ERROR:../accel/tcg/user-exec.c:810:probe_access: assertion failed: (-(addr | TARGET_PAGE_MASK) >= size)
  timeout: the monitored command dumped core
  Aborted
  make: *** [Makefile:223: run-test-rvv-ldst] Error 134
  make: Leaving directory 'build/tests/tcg/riscv64-linux-user'

I wrote the assembly one first before realising a C version would be
easy enough to do too. I'm not sure about using memcmp to check (in case
it's vectorised) so perhaps that's where the asm wins. I can tidy them
up and send the preferred version if we decide to put it in the tree.

Joel Stanley (2):
  tests/tcg/riscv64: Vector load test
  tests/tcg/riscv64: Add intrinsics version of test-rvv-ldst

 tests/tcg/riscv64/test-rvv-ldst-intrinsics.c |  66 ++++++++++
 tests/tcg/riscv64/Makefile.target            |  19 +++
 tests/tcg/riscv64/test-rvv-ldst.S            | 131 +++++++++++++++++++
 3 files changed, 216 insertions(+)
 create mode 100644 tests/tcg/riscv64/test-rvv-ldst-intrinsics.c
 create mode 100644 tests/tcg/riscv64/test-rvv-ldst.S

-- 
2.53.0
Re: [PATCH 0/2] tests/tcg/riscv64: Add vector load and store tests
Posted by Richard Henderson 21 hours ago
On 8/20/26 06:02, Joel Stanley wrote:
> Hi Richard, I was testing your riscv vector load/store series and
> noticed there were some regressions with page crossing loads and stores.
> We don't have any tests for that in the tree, so I wrote some.
> 
> The tests trigger assertions in linux-user for me:
> 
>    $ make -C build/tests/tcg/riscv64-linux-user run-test-rvv-ldst
>    make: Entering directory 'build/tests/tcg/riscv64-linux-user'
>      TEST    test-rvv-ldst on riscv64
>    **
>    ERROR:../accel/tcg/user-exec.c:810:probe_access: assertion failed: (-(addr | TARGET_PAGE_MASK) >= size)
>    timeout: the monitored command dumped core
>    Aborted
>    make: *** [Makefile:223: run-test-rvv-ldst] Error 134
>    make: Leaving directory 'build/tests/tcg/riscv64-linux-user'

Bah.  Off by one bug.  I'll post v2 shortly.
Thanks again.


r~
Re: [PATCH 0/2] tests/tcg/riscv64: Add vector load and store tests
Posted by Richard Henderson 1 day, 5 hours ago
On 8/20/26 06:02, Joel Stanley wrote:
> Hi Richard, I was testing your riscv vector load/store series and
> noticed there were some regressions with page crossing loads and stores.
> We don't have any tests for that in the tree, so I wrote some.
> 
> The tests trigger assertions in linux-user for me:
> 
>    $ make -C build/tests/tcg/riscv64-linux-user run-test-rvv-ldst
>    make: Entering directory 'build/tests/tcg/riscv64-linux-user'
>      TEST    test-rvv-ldst on riscv64
>    **
>    ERROR:../accel/tcg/user-exec.c:810:probe_access: assertion failed: (-(addr | TARGET_PAGE_MASK) >= size)
>    timeout: the monitored command dumped core
>    Aborted
>    make: *** [Makefile:223: run-test-rvv-ldst] Error 134
>    make: Leaving directory 'build/tests/tcg/riscv64-linux-user'
> 
> I wrote the assembly one first before realising a C version would be
> easy enough to do too. I'm not sure about using memcmp to check (in case
> it's vectorised) so perhaps that's where the asm wins. I can tidy them
> up and send the preferred version if we decide to put it in the tree.

Thanks!  I'll take a look at these failures.


r~