powerpc/ebpf/jit: Implement JIT compiler for extended BPF
authorNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Wed, 22 Jun 2016 16:25:07 +0000 (21:55 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 24 Jun 2016 05:17:57 +0000 (15:17 +1000)
commit156d0e290e969caba25f1851c52417c14d141b24
treea232dcd99242656e3e935e44d0fa6649618f58ba
parent6ac0ba5a4f82b40b4f6b3a75e7e4f0a15a3d7b9b
powerpc/ebpf/jit: Implement JIT compiler for extended BPF

PPC64 eBPF JIT compiler.

Enable with:
  echo 1 > /proc/sys/net/core/bpf_jit_enable
or
  echo 2 > /proc/sys/net/core/bpf_jit_enable

... to see the generated JIT code. This can further be processed with
tools/net/bpf_jit_disasm.

With CONFIG_TEST_BPF=m and 'modprobe test_bpf':

 test_bpf: Summary: 305 PASSED, 0 FAILED, [297/297 JIT'ed]

... on both ppc64 BE and LE.

The details of the approach are documented through various comments in
the code.

Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/Kconfig
arch/powerpc/include/asm/asm-compat.h
arch/powerpc/include/asm/ppc-opcode.h
arch/powerpc/net/Makefile
arch/powerpc/net/bpf_jit.h
arch/powerpc/net/bpf_jit64.h [new file with mode: 0644]
arch/powerpc/net/bpf_jit_asm64.S [new file with mode: 0644]
arch/powerpc/net/bpf_jit_comp64.c [new file with mode: 0644]