From: Pu Lehui <pulehui@huawei.com>
To: Chen Pei <cp0613@linux.alibaba.com>, <ast@kernel.org>,
<daniel@iogearbox.net>, <andrii@kernel.org>, <memxor@gmail.com>,
<bjorn@kernel.org>, <puranjay@kernel.org>
Cc: <eddyz87@gmail.com>, <martin.lau@linux.dev>, <song@kernel.org>,
<yonghong.song@linux.dev>, <jolsa@kernel.org>,
<emil@etsalapatis.com>, <pjw@kernel.org>, <palmer@dabbelt.com>,
<shuah@kernel.org>, <guoren@kernel.org>, <bpf@vger.kernel.org>,
<linux-riscv@lists.infradead.org>,
<linux-kselftest@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH bpf-next 2/2] selftests/bpf: Enable arena LDSX tests for riscv64
Date: Tue, 18 Aug 2026 22:27:26 +0800 [thread overview]
Message-ID: <e6d593d6-ef57-440e-b624-a6ff4ad79744@huawei.com> (raw)
In-Reply-To: <913f4fd8b3d0b7470428d9e6f0ed64f3a89e8a98.1786708960.git.cp0613@linux.alibaba.com>
On 2026/8/17 15:24, Chen Pei wrote:
> Now that the riscv64 JIT supports signed arena loads
> (BPF_PROBE_MEM32SX), enable the arena LDSX tests on riscv64:
> add JIT disassembly assertions for arena_ldsx_disasm (arena base in
> s7, add into t2, sign-extending lw/lh/lb loads) and run
> arena_ldsx_exception and arena_ldsx_s8/s16/s32 on riscv64.
>
> Signed-off-by: Chen Pei <cp0613@linux.alibaba.com>
> ---
> .../testing/selftests/bpf/progs/verifier_ldsx.c | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/tools/testing/selftests/bpf/progs/verifier_ldsx.c b/tools/testing/selftests/bpf/progs/verifier_ldsx.c
> index 41340877dc9d..ed0a0f159bc1 100644
> --- a/tools/testing/selftests/bpf/progs/verifier_ldsx.c
> +++ b/tools/testing/selftests/bpf/progs/verifier_ldsx.c
> @@ -286,6 +286,19 @@ __jited("add x11, x0, x28")
> __jited("ldrsh x22, [x11, #0x18]")
> __jited("add x11, x0, x28")
> __jited("ldrsb x22, [x11, #0x20]")
> +__arch_riscv64
> +__jited("add t2, a5, s7")
> +__jited("lw s3, 0x10(t2)")
> +__jited("add t2, a5, s7")
> +__jited("lh s3, 0x18(t2)")
> +__jited("add t2, a5, s7")
> +__jited("lb s3, 0x20(t2)")
> +__jited("add t2, a0, s7")
> +__jited("lw s4, 0x10(t2)")
> +__jited("add t2, a0, s7")
> +__jited("lh s4, 0x18(t2)")
> +__jited("add t2, a0, s7")
> +__jited("lb s4, 0x20(t2)")
> __naked void arena_ldsx_disasm(void *ctx)
> {
> asm volatile (
> @@ -317,6 +330,7 @@ __description("Arena LDSX Exception")
> __success __retval(0)
> __arch_x86_64
> __arch_arm64
> +__arch_riscv64
> __naked void arena_ldsx_exception(void *ctx)
> {
> asm volatile (
> @@ -338,6 +352,7 @@ __description("Arena LDSX, S8")
> __success __retval(-1)
> __arch_x86_64
> __arch_arm64
> +__arch_riscv64
> __naked void arena_ldsx_s8(void *ctx)
> {
> asm volatile (
> @@ -369,6 +384,7 @@ __description("Arena LDSX, S16")
> __success __retval(-1)
> __arch_x86_64
> __arch_arm64
> +__arch_riscv64
> __naked void arena_ldsx_s16(void *ctx)
> {
> asm volatile (
> @@ -400,6 +416,7 @@ __description("Arena LDSX, S32")
> __success __retval(-1)
> __arch_x86_64
> __arch_arm64
> +__arch_riscv64
> __naked void arena_ldsx_s32(void *ctx)
> {
> asm volatile (
Reviewed-by: Pu Lehui <pulehui@huawei.com>
WARNING: multiple messages have this Message-ID (diff)
From: Pu Lehui <pulehui@huawei.com>
To: Chen Pei <cp0613@linux.alibaba.com>, <ast@kernel.org>,
<daniel@iogearbox.net>, <andrii@kernel.org>, <memxor@gmail.com>,
<bjorn@kernel.org>, <puranjay@kernel.org>
Cc: <eddyz87@gmail.com>, <martin.lau@linux.dev>, <song@kernel.org>,
<yonghong.song@linux.dev>, <jolsa@kernel.org>,
<emil@etsalapatis.com>, <pjw@kernel.org>, <palmer@dabbelt.com>,
<shuah@kernel.org>, <guoren@kernel.org>, <bpf@vger.kernel.org>,
<linux-riscv@lists.infradead.org>,
<linux-kselftest@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH bpf-next 2/2] selftests/bpf: Enable arena LDSX tests for riscv64
Date: Tue, 18 Aug 2026 22:27:26 +0800 [thread overview]
Message-ID: <e6d593d6-ef57-440e-b624-a6ff4ad79744@huawei.com> (raw)
In-Reply-To: <913f4fd8b3d0b7470428d9e6f0ed64f3a89e8a98.1786708960.git.cp0613@linux.alibaba.com>
On 2026/8/17 15:24, Chen Pei wrote:
> Now that the riscv64 JIT supports signed arena loads
> (BPF_PROBE_MEM32SX), enable the arena LDSX tests on riscv64:
> add JIT disassembly assertions for arena_ldsx_disasm (arena base in
> s7, add into t2, sign-extending lw/lh/lb loads) and run
> arena_ldsx_exception and arena_ldsx_s8/s16/s32 on riscv64.
>
> Signed-off-by: Chen Pei <cp0613@linux.alibaba.com>
> ---
> .../testing/selftests/bpf/progs/verifier_ldsx.c | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/tools/testing/selftests/bpf/progs/verifier_ldsx.c b/tools/testing/selftests/bpf/progs/verifier_ldsx.c
> index 41340877dc9d..ed0a0f159bc1 100644
> --- a/tools/testing/selftests/bpf/progs/verifier_ldsx.c
> +++ b/tools/testing/selftests/bpf/progs/verifier_ldsx.c
> @@ -286,6 +286,19 @@ __jited("add x11, x0, x28")
> __jited("ldrsh x22, [x11, #0x18]")
> __jited("add x11, x0, x28")
> __jited("ldrsb x22, [x11, #0x20]")
> +__arch_riscv64
> +__jited("add t2, a5, s7")
> +__jited("lw s3, 0x10(t2)")
> +__jited("add t2, a5, s7")
> +__jited("lh s3, 0x18(t2)")
> +__jited("add t2, a5, s7")
> +__jited("lb s3, 0x20(t2)")
> +__jited("add t2, a0, s7")
> +__jited("lw s4, 0x10(t2)")
> +__jited("add t2, a0, s7")
> +__jited("lh s4, 0x18(t2)")
> +__jited("add t2, a0, s7")
> +__jited("lb s4, 0x20(t2)")
> __naked void arena_ldsx_disasm(void *ctx)
> {
> asm volatile (
> @@ -317,6 +330,7 @@ __description("Arena LDSX Exception")
> __success __retval(0)
> __arch_x86_64
> __arch_arm64
> +__arch_riscv64
> __naked void arena_ldsx_exception(void *ctx)
> {
> asm volatile (
> @@ -338,6 +352,7 @@ __description("Arena LDSX, S8")
> __success __retval(-1)
> __arch_x86_64
> __arch_arm64
> +__arch_riscv64
> __naked void arena_ldsx_s8(void *ctx)
> {
> asm volatile (
> @@ -369,6 +384,7 @@ __description("Arena LDSX, S16")
> __success __retval(-1)
> __arch_x86_64
> __arch_arm64
> +__arch_riscv64
> __naked void arena_ldsx_s16(void *ctx)
> {
> asm volatile (
> @@ -400,6 +416,7 @@ __description("Arena LDSX, S32")
> __success __retval(-1)
> __arch_x86_64
> __arch_arm64
> +__arch_riscv64
> __naked void arena_ldsx_s32(void *ctx)
> {
> asm volatile (
Reviewed-by: Pu Lehui <pulehui@huawei.com>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2026-08-18 14:27 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-17 7:24 [PATCH bpf-next 0/2] bpf, riscv: Add support for signed arena loads Chen Pei
2026-08-17 7:24 ` Chen Pei
2026-08-17 7:24 ` [PATCH bpf-next 1/2] " Chen Pei
2026-08-17 7:24 ` Chen Pei
2026-08-17 8:16 ` bot+bpf-ci
2026-08-17 8:16 ` bot+bpf-ci
2026-08-18 14:27 ` Pu Lehui
2026-08-18 14:27 ` Pu Lehui
2026-08-19 3:41 ` Pu Lehui
2026-08-19 3:41 ` Pu Lehui
2026-08-19 8:23 ` Chen Pei
2026-08-19 8:23 ` Chen Pei
2026-08-17 7:24 ` [PATCH bpf-next 2/2] selftests/bpf: Enable arena LDSX tests for riscv64 Chen Pei
2026-08-17 7:24 ` Chen Pei
2026-08-18 14:27 ` Pu Lehui [this message]
2026-08-18 14:27 ` Pu Lehui
2026-08-18 14:28 ` [PATCH bpf-next 0/2] bpf, riscv: Add support for signed arena loads Pu Lehui
2026-08-18 14:28 ` Pu Lehui
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e6d593d6-ef57-440e-b624-a6ff4ad79744@huawei.com \
--to=pulehui@huawei.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bjorn@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=cp0613@linux.alibaba.com \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=emil@etsalapatis.com \
--cc=guoren@kernel.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=martin.lau@linux.dev \
--cc=memxor@gmail.com \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=puranjay@kernel.org \
--cc=shuah@kernel.org \
--cc=song@kernel.org \
--cc=yonghong.song@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.