Skip to content

bpf: Support cpu v4 instructions for LoongArch

Hengqi Chen bpf loongarch 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8LoongArch: Add more instruction opcodes and emit_* helpersarch/loongarch/include/asm/inst.h+13 -00 replies
2/8LoongArch: BPF: Support sign-extension load instructionsarch/loongarch/net/bpf_jit.c+39 -100 replies
3/8LoongArch: BPF: Support sign-extension mov instructionsarch/loongarch/net/bpf_jit.c+17 -20 replies
4/8LoongArch: BPF: Support unconditional bswap instructionsarch/loongarch/net/bpf_jit.c+1 -00 replies
5/8LoongArch: BPF: Support 32-bit offset jmp instructionsarch/loongarch/net/bpf_jit.c+5 -10 replies
6/8LoongArch: BPF: Support signed div instructionsarch/loongarch/net/bpf_jit.c+25 -90 replies
7/8LoongArch: BPF: Support signed mod instructionsarch/loongarch/net/bpf_jit.c+25 -90 replies
8/8selftests/bpf: Enable cpu v4 tests for LoongArchtools/testing/selftests/bpf/progs/test_ldsx_insn.c tools/testing/selftests/bpf/progs/verifier_bswap.c tools/testing/selftests/bpf/progs/verifier_gotol.c +3 more+12 -69 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH bpf-next 0/8] bpf: Support cpu v4 instructions for LoongArch

This patchset adds support for cpu v4 instructions for LoongArch. For details, see the proposal ([0]) and its implementation in BPF core ([1]).

[0]: https://lore.kernel.org/bpf/[email protected]/
[1]: https://lore.kernel.org/all/[email protected]/

Hengqi Chen (8):
LoongArch: Add more instruction opcodes and emit_* helpers
LoongArch: BPF: Support sign-extension load instructions
LoongArch: BPF: Support sign-extension mov instructions
LoongArch: BPF: Support unconditional bswap instructions
LoongArch: BPF: Support 32-bit offset jmp instructions
LoongArch: BPF: Support signed div instructions
LoongArch: BPF: Support signed mod instructions selftests/bpf: Enable cpu v4 tests for LoongArch

 arch/loongarch/include/asm/inst.h             |  13 ++
 arch/loongarch/net/bpf_jit.c                  | 143 ++++++++++++++----
 .../selftests/bpf/progs/test_ldsx_insn.c      |   3 +-
 .../selftests/bpf/progs/verifier_bswap.c      |   3 +-
 .../selftests/bpf/progs/verifier_gotol.c      |   3 +-
 .../selftests/bpf/progs/verifier_ldsx.c       |   3 +-
 .../selftests/bpf/progs/verifier_movsx.c      |   3 +-
 .../selftests/bpf/progs/verifier_sdiv.c       |   3 +-
 8 files changed, 137 insertions(+), 37 deletions(-)
Signature · 1 line
2.34.1