mbox series

[bpf-next,0/8] bpf: Support cpu v4 instructions for LoongArch

Message ID 20231026184337.563801-1-hengqi.chen@gmail.com (mailing list archive)
Headers show
Series bpf: Support cpu v4 instructions for LoongArch | expand

Message

Hengqi Chen Oct. 26, 2023, 6:43 p.m. UTC
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/4bfe98be-5333-1c7e-2f6d-42486c8ec039@meta.com/
  [1]: https://lore.kernel.org/all/20230728011143.3710005-1-yonghong.song@linux.dev/

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(-)