[PATCH v2 0/2] bpf, riscv: add timed may_goto support

Feng Jiang posted 2 patches 1 week, 4 days ago
There is a newer version of this series
arch/riscv/net/Makefile                            |  2 +-
arch/riscv/net/bpf_jit_comp64.c                    | 13 ++++++-
arch/riscv/net/bpf_timed_may_goto.S                | 44 ++++++++++++++++++++++
tools/testing/selftests/bpf/progs/stream.c         |  1 +
.../selftests/bpf/progs/verifier_bpf_fastcall.c    |  1 +
.../selftests/bpf/progs/verifier_may_goto_1.c      |  4 ++
6 files changed, 63 insertions(+), 2 deletions(-)
[PATCH v2 0/2] bpf, riscv: add timed may_goto support
Posted by Feng Jiang 1 week, 4 days ago
This series adds RISC-V JIT support for the timed may_goto loop bound.

Patch 1 implements arch_bpf_timed_may_goto() and enables
bpf_jit_supports_timed_may_goto() so the verifier uses the timed
expansion path.

Patch 2 enables the verifier_may_goto_1, stream_cond_break, and
may_goto_interaction fastcall tests on riscv64.

Tested on riscv64 QEMU (rva23s64): may_goto programs load and JIT
correctly, and the 250ms timeout path works as expected.

Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
---
Changes in v2:
- Fix BPF_REG_0 being clobbered after arch_bpf_timed_may_goto() calls.
- Enable the may_goto_interaction fastcall test on riscv64.

---
Feng Jiang (2):
      bpf, riscv: add support for timed may_goto
      selftests/bpf: enable timed may_goto tests for riscv64

 arch/riscv/net/Makefile                            |  2 +-
 arch/riscv/net/bpf_jit_comp64.c                    | 13 ++++++-
 arch/riscv/net/bpf_timed_may_goto.S                | 44 ++++++++++++++++++++++
 tools/testing/selftests/bpf/progs/stream.c         |  1 +
 .../selftests/bpf/progs/verifier_bpf_fastcall.c    |  1 +
 .../selftests/bpf/progs/verifier_may_goto_1.c      |  4 ++
 6 files changed, 63 insertions(+), 2 deletions(-)
---
base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482
change-id: 20260710-riscv-bpf-timed-may-goto-0dce564985af

Best regards,
-- 
Feng Jiang <jiangfeng@kylinos.cn>