linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next 00/10] Add support arena atomics for RV64
@ 2025-07-19  9:17 Pu Lehui
  2025-07-19  9:17 ` [PATCH bpf-next 01/10] riscv, bpf: Extract emit_stx() helper Pu Lehui
                   ` (12 more replies)
  0 siblings, 13 replies; 27+ messages in thread
From: Pu Lehui @ 2025-07-19  9:17 UTC (permalink / raw)
  To: bpf, linux-riscv, linux-kernel
  Cc: Björn Töpel, Puranjay Mohan, Palmer Dabbelt,
	Alexandre Ghiti, Alexei Starovoitov, Daniel Borkmann,
	Andrii Nakryiko, Martin KaFai Lau, Eduard Zingerman, Song Liu,
	Yonghong Song, John Fastabend, KP Singh, Stanislav Fomichev,
	Hao Luo, Jiri Olsa, Pu Lehui

From: Pu Lehui <pulehui@huawei.com>

patch 1-3 refactor redundant load and store operations.
patch 4-7 add Zacas instructions for cmpxchg.
patch 8 optimizes exception table handling.
patch 9-10 add support arena atomics for RV64.

Tests `test_progs -t atomic,arena` have passed as shown bellow,
as well as `test_verifier` and `test_bpf.ko` have passed.

$ ./test_progs -t arena,atomic
#3/1     arena_atomics/add:OK
#3/2     arena_atomics/sub:OK
#3/3     arena_atomics/and:OK
#3/4     arena_atomics/or:OK
#3/5     arena_atomics/xor:OK
#3/6     arena_atomics/cmpxchg:OK
#3/7     arena_atomics/xchg:OK
#3/8     arena_atomics/uaf:OK
#3/9     arena_atomics/load_acquire:OK
#3/10    arena_atomics/store_release:OK
#3       arena_atomics:OK
#4/1     arena_htab/arena_htab_llvm:OK
#4/2     arena_htab/arena_htab_asm:OK
#4       arena_htab:OK
#5/1     arena_list/arena_list_1:OK
#5/2     arena_list/arena_list_1000:OK
#5       arena_list:OK
#6/1     arena_spin_lock/arena_spin_lock_1:OK
#6/2     arena_spin_lock/arena_spin_lock_1000:OK
#6/3     arena_spin_lock/arena_spin_lock_50000:OK
#6       arena_spin_lock:OK
#10      atomic_bounds:OK
#11/1    atomics/add:OK
#11/2    atomics/sub:OK
#11/3    atomics/and:OK
#11/4    atomics/or:OK
#11/5    atomics/xor:OK
#11/6    atomics/cmpxchg:OK
#11/7    atomics/xchg:OK
#11      atomics:OK
#513/1   verifier_arena/basic_alloc1:OK
#513/2   verifier_arena/basic_alloc2:OK
#513/3   verifier_arena/basic_alloc3:OK
#513/4   verifier_arena/basic_reserve1:OK
#513/5   verifier_arena/basic_reserve2:OK
#513/6   verifier_arena/reserve_twice:OK
#513/7   verifier_arena/reserve_invalid_region:OK
#513/8   verifier_arena/iter_maps1:OK
#513/9   verifier_arena/iter_maps2:OK
#513/10  verifier_arena/iter_maps3:OK
#513     verifier_arena:OK
#514/1   verifier_arena_large/big_alloc1:OK
#514/2   verifier_arena_large/access_reserved:OK
#514/3   verifier_arena_large/request_partially_reserved:OK
#514/4   verifier_arena_large/free_reserved:OK
#514/5   verifier_arena_large/big_alloc2:OK
#514     verifier_arena_large:OK
Summary: 8/39 PASSED, 0 SKIPPED, 0 FAILED

Pu Lehui (10):
  riscv, bpf: Extract emit_stx() helper
  riscv, bpf: Extract emit_st() helper
  riscv, bpf: Extract emit_ldx() helper
  riscv: Separate toolchain support dependency from RISCV_ISA_ZACAS
  riscv, bpf: Add rv_ext_enabled macro for runtime detection extentsion
  riscv, bpf: Add Zacas instructions
  riscv, bpf: Optimize cmpxchg insn with Zacas support
  riscv, bpf: Add ex_insn_off and ex_jmp_off for exception table
    handling
  riscv, bpf: Add support arena atomics for RV64
  selftests/bpf: Enable arena atomics tests for RV64

 arch/riscv/Kconfig                            |   1 -
 arch/riscv/include/asm/cmpxchg.h              |   6 +-
 arch/riscv/kernel/setup.c                     |   1 +
 arch/riscv/net/bpf_jit.h                      |  70 ++-
 arch/riscv/net/bpf_jit_comp64.c               | 516 +++++-------------
 .../selftests/bpf/progs/arena_atomics.c       |   9 +-
 6 files changed, 214 insertions(+), 389 deletions(-)

-- 
2.34.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2025-08-15 12:06 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-19  9:17 [PATCH bpf-next 00/10] Add support arena atomics for RV64 Pu Lehui
2025-07-19  9:17 ` [PATCH bpf-next 01/10] riscv, bpf: Extract emit_stx() helper Pu Lehui
2025-08-04 20:25   ` Björn Töpel
2025-07-19  9:17 ` [PATCH bpf-next 02/10] riscv, bpf: Extract emit_st() helper Pu Lehui
2025-08-04 20:26   ` Björn Töpel
2025-07-19  9:17 ` [PATCH bpf-next 03/10] riscv, bpf: Extract emit_ldx() helper Pu Lehui
2025-08-04 20:27   ` Björn Töpel
2025-07-19  9:17 ` [PATCH bpf-next 04/10] riscv: Separate toolchain support dependency from RISCV_ISA_ZACAS Pu Lehui
2025-08-04 20:29   ` Björn Töpel
2025-07-19  9:17 ` [PATCH bpf-next 05/10] riscv, bpf: Add rv_ext_enabled macro for runtime detection extentsion Pu Lehui
2025-08-04 20:32   ` Björn Töpel
2025-07-19  9:17 ` [PATCH bpf-next 06/10] riscv, bpf: Add Zacas instructions Pu Lehui
2025-08-04 20:32   ` Björn Töpel
2025-07-19  9:17 ` [PATCH bpf-next 07/10] riscv, bpf: Optimize cmpxchg insn with Zacas support Pu Lehui
2025-08-04 20:41   ` Björn Töpel
2025-07-19  9:17 ` [PATCH bpf-next 08/10] riscv, bpf: Add ex_insn_off and ex_jmp_off for exception table handling Pu Lehui
2025-08-05  6:22   ` Björn Töpel
2025-07-19  9:17 ` [PATCH bpf-next 09/10] riscv, bpf: Add support arena atomics for RV64 Pu Lehui
2025-08-05  6:35   ` Björn Töpel
2025-07-19  9:17 ` [PATCH bpf-next 10/10] selftests/bpf: Enable arena atomics tests " Pu Lehui
2025-08-04 20:36   ` Björn Töpel
2025-07-20 20:37 ` [PATCH bpf-next 00/10] Add support arena atomics " Björn Töpel
2025-08-05  6:38 ` Björn Töpel
2025-08-05  6:52   ` Pu Lehui
2025-08-15  8:55     ` Daniel Borkmann
2025-08-15  9:08       ` Pu Lehui
2025-08-15  8:50 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).