| #
5c6e22ad |
| 06-Oct-2026 |
Andy Chiu <tchiu@tenstorrent.com> |
selftest: riscv: test vectorized user copy
Add a test that pushes a 1KiB pseudo-random stream through a pipe, so write() and read() copy it in and out of the kernel on the vectorized uaccess path, a
selftest: riscv: test vectorized user copy
Add a test that pushes a 1KiB pseudo-random stream through a pipe, so write() and read() copy it in and out of the kernel on the vectorized uaccess path, and compares the result against the original. Both buffers shift every iteration to sweep all relative alignments, and 16 processes per online CPU keep the vector unit contended. The compare is a byte at a time loop through volatile pointers rather than memcmp(), keeping it scalar and independent of the user vector state.
Assisted-by: Claude-Code:claude-opus-5 Signed-off-by: Andy Chiu <tchiu@tenstorrent.com> Link: https://patch.msgid.link/20260918215154.2481482-4-tchiu@tenstorrent.com Signed-off-by: Paul Walmsley <pjw@kernel.org>
show more ...
|
| #
c0db0690 |
| 07-Jun-2026 |
Zong Li <zong.li@sifive.com> |
selftests/riscv: fix compiler output flag spacing in all Makefiles
Standardize the compiler output flag format across all RISC-V selftests by adding a space between '-o' and '$@'.
Although '-o$@' i
selftests/riscv: fix compiler output flag spacing in all Makefiles
Standardize the compiler output flag format across all RISC-V selftests by adding a space between '-o' and '$@'.
Although '-o$@' is perfectly valid for GCC/Clang to parse, changing it to '-o $@' with a space aligns with the GNU official documentation conventions, improves readability by visually separating the flag from the target variable, and ensures consistency with other architectures.
Currently, RISC-V selftests use '-o$@' (without space) in 13 instances across 6 Makefiles, while all other architectures consistently use '-o $@' (with space). This inconsistency makes RISC-V an outlier in the kernel's selftest infrastructure.
Signed-off-by: Zong Li <zong.li@sifive.com> Link: https://patch.msgid.link/20260511032917.3542802-1-zong.li@sifive.com [pjw@kernel.org: cleaned up patch description] Signed-off-by: Paul Walmsley <pjw@kernel.org>
show more ...
|
| #
600f72de |
| 26-Jan-2026 |
Sergey Matyukevich <geomatsi@gmail.com> |
selftests: riscv: test ptrace vector interface
Add a test case to check ptrace behavior in the case when vector extension is supported by the system, but vector context is not yet enabled for the tr
selftests: riscv: test ptrace vector interface
Add a test case to check ptrace behavior in the case when vector extension is supported by the system, but vector context is not yet enabled for the traced process.
Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com> Reviewed-by: Andy Chiu <andybnac@gmail.com> Tested-by: Andy Chiu <andybnac@gmail.com> Link: https://patch.msgid.link/20251214163537.1054292-6-geomatsi@gmail.com [pjw@kernel.org: dropped duplicate sys/wait.h include] Signed-off-by: Paul Walmsley <pjw@kernel.org>
show more ...
|
| #
f0ae09a8 |
| 18-Nov-2025 |
Yong-Xuan Wang <yongxuan.wang@sifive.com> |
selftests: riscv: Add test for the Vector ptrace interface
Add a test case that does some basic verification of the Vector ptrace interface. This forks a child process then using ptrace to inspect a
selftests: riscv: Add test for the Vector ptrace interface
Add a test case that does some basic verification of the Vector ptrace interface. This forks a child process then using ptrace to inspect and manipulate the v31 register of the child.
Signed-off-by: Yong-Xuan Wang <yongxuan.wang@sifive.com> Reviewed-by: Andy Chiu <andybnac@gmail.com> Tested-by: Andy Chiu <andybnac@gmail.com> Link: https://patch.msgid.link/20251013091318.467864-3-yongxuan.wang@sifive.com Signed-off-by: Paul Walmsley <pjw@kernel.org>
show more ...
|
| #
57d7713a |
| 14-Nov-2024 |
Charlie Jenkins <charlie@rivosinc.com> |
selftests: riscv: Fix vector tests
Overhaul the riscv vector tests to use kselftest_harness to help the test cases correctly report the results and decouple the individual test cases from each other
selftests: riscv: Fix vector tests
Overhaul the riscv vector tests to use kselftest_harness to help the test cases correctly report the results and decouple the individual test cases from each other. With this refactoring, only run the test cases if vector is reported and properly report the test case as skipped otherwise. The v_initval_nolibc test was previously not checking if vector was supported and used a function (malloc) which invalidates the state of the vector registers.
Signed-off-by: Charlie Jenkins <charlie@rivosinc.com> Tested-by: Yangyu Chen <cyy@cyyself.name> Link: https://lore.kernel.org/r/20241113-xtheadvector-v11-12-236c22791ef9@rivosinc.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
show more ...
|
| #
5c93c4c7 |
| 27-Jun-2023 |
Andy Chiu <andy.chiu@sifive.com> |
selftests: Test RISC-V Vector's first-use handler
This add a test to check if the kernel zero-initializes all V registers after the first-use trap handler returns.
If V registers are not zero-initi
selftests: Test RISC-V Vector's first-use handler
This add a test to check if the kernel zero-initializes all V registers after the first-use trap handler returns.
If V registers are not zero-initialized, then the test should fail one out of several runs:
``` root@sifive-fpga:~# ./v_initval_nolibc # vl = 256 not ok 1 detect stale values on v-regesters 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4c 41 4e 47 3d 43 0 50 41 54 48 3d 2f 75 73 72 2f 6c 6f 63 61 6c 2f 73 62 69 6e 3a 2f 75 73 72 2f 6c 6f 63 61 6c 2f 62 69 6e 3a 2f 75 73 72 ff ff 81 0 0 0 0 0 0 0 0 0 0 0 0 0 ```
Otherwise, the test passes without errors each run.
Signed-off-by: Andy Chiu <andy.chiu@sifive.com> Reviewed-by: Björn Töpel <bjorn@rivosinc.com> Link: https://lore.kernel.org/r/20230627015556.12329-3-andy.chiu@sifive.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
show more ...
|
| #
7cf6198c |
| 05-Jun-2023 |
Andy Chiu <andy.chiu@sifive.com> |
selftests: Test RISC-V Vector prctl interface
This add a test for prctl interface that controls the use of userspace Vector.
Signed-off-by: Andy Chiu <andy.chiu@sifive.com> Link: https://lore.kerne
selftests: Test RISC-V Vector prctl interface
This add a test for prctl interface that controls the use of userspace Vector.
Signed-off-by: Andy Chiu <andy.chiu@sifive.com> Link: https://lore.kernel.org/r/20230605110724.21391-27-andy.chiu@sifive.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
show more ...
|