riscv, bpf: Add necessary Zbb instructions
authorPu Lehui <pulehui@huawei.com>
Mon, 15 Jan 2024 13:12:33 +0000 (13:12 +0000)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 29 Jan 2024 15:25:33 +0000 (16:25 +0100)
commit647b93f65daa128d9a0e4aac744a5fcf5f58b2d2
tree1dbbebfef86d0568d6de577164baac167ef10f27
parent361db44c3c59cde05e9926647f16255e274a37f4
riscv, bpf: Add necessary Zbb instructions

Add necessary Zbb instructions introduced by [0] to reduce code size and
improve performance of RV64 JIT. Meanwhile, a runtime deteted helper is
added to check whether the CPU supports Zbb instructions.

Signed-off-by: Pu Lehui <pulehui@huawei.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Tested-by: Björn Töpel <bjorn@rivosinc.com>
Acked-by: Björn Töpel <bjorn@kernel.org>
Link: https://github.com/riscv/riscv-bitmanip/releases/download/1.0.0/bitmanip-1.0.0-38-g865e7a7.pdf
Link: https://lore.kernel.org/bpf/20240115131235.2914289-5-pulehui@huaweicloud.com
arch/riscv/net/bpf_jit.h