Conversation
|
Master branch: 422ee58 |
|
Master branch: e91d280 |
e5a7e77 to
a2bf40b
Compare
|
Master branch: 128dac5 |
a2bf40b to
54545d9
Compare
|
Master branch: 80123f0 |
54545d9 to
4c91f40
Compare
|
Master branch: 5d1e9f4 |
4c91f40 to
2115937
Compare
|
Master branch: f95f768 |
2115937 to
767ce3d
Compare
|
Master branch: 5912fcb |
767ce3d to
251e98b
Compare
|
Master branch: 4172843 |
251e98b to
7b70947
Compare
|
Master branch: 19face1 |
7b70947 to
e817258
Compare
|
Master branch: cca6242 |
e817258 to
7be1b81
Compare
|
Master branch: 8dd039a |
7be1b81 to
d0b8789
Compare
|
Master branch: 3caa7d2 |
d0b8789 to
d4e9214
Compare
|
Master branch: dc37dc6 |
d4e9214 to
ebaafb4
Compare
|
Master branch: e531396 |
ebaafb4 to
d119788
Compare
|
Master branch: 1127170 |
d119788 to
e939276
Compare
|
Master branch: 85fbd23 |
e939276 to
13623db
Compare
|
Master branch: a5a358a |
13623db to
5c4fec0
Compare
|
Master branch: 4cc0991 |
5c4fec0 to
ec7784b
Compare
|
Master branch: 4407fa0 |
ec7784b to
49c34e0
Compare
|
Master branch: d130e95 |
49c34e0 to
8ff730a
Compare
|
Master branch: 9c3de61 |
8ff730a to
9210bdb
Compare
|
Master branch: edc21dc |
9210bdb to
2a50cd6
Compare
|
Master branch: d2b94f3 |
2a50cd6 to
925fe58
Compare
If CONFIG_ARM64_LSE_ATOMICS is off, encoders for LSE-related instructions can return AARCH64_BREAK_FAULT directly in insn.h. In order to access AARCH64_BREAK_FAULT in insn.h, we can not include debug-monitors.h in insn.h, because debug-monitors.h has already depends on insn.h, so just move AARCH64_BREAK_FAULT into insn-def.h. It will be used by the following patch to eliminate unnecessary LSE-related encoders when CONFIG_ARM64_LSE_ATOMICS is off. Signed-off-by: Hou Tao <houtao1@huawei.com>
It is a preparation patch for eBPF atomic supports under arm64. eBPF
needs support atomic[64]_fetch_add, atomic[64]_[fetch_]{and,or,xor} and
atomic[64]_{xchg|cmpxchg}. The ordering semantics of eBPF atomics are
the same with the implementations in linux kernel.
Add three helpers to support LDCLR/LDEOR/LDSET/SWP, CAS and DMB
instructions. STADD/STCLR/STEOR/STSET are simply encoded as aliases for
LDADD/LDCLR/LDEOR/LDSET with XZR as the destination register, so no extra
helper is added. atomic_fetch_add() and other atomic ops needs support for
STLXR instruction, so extend enum aarch64_insn_ldst_type to do that.
LDADD/LDEOR/LDSET/SWP and CAS instructions are only available when LSE
atomics is enabled, so just return AARCH64_BREAK_FAULT directly in
these newly-added helpers if CONFIG_ARM64_LSE_ATOMICS is disabled.
Signed-off-by: Hou Tao <houtao1@huawei.com>
|
Master branch: 8cbf062 |
Atomics for eBPF patch series adds support for atomic[64]_fetch_add,
atomic[64]_[fetch_]{and,or,xor} and atomic[64]_{xchg|cmpxchg}, but
it only adds support for x86-64, so support these atomic operations
for arm64 as well.
Basically the implementation procedure is almost mechanical translation
of code snippets in atomic_ll_sc.h & atomic_lse.h & cmpxchg.h located
under arch/arm64/include/asm.
When LSE atomic is unavailable, an extra temporary register is needed for
(BPF_ADD | BPF_FETCH) to save the value of src register, instead of adding
TMP_REG_4 just use BPF_REG_AX instead. Also make emit_lse_atomic() as an
empty inline function when CONFIG_ARM64_LSE_ATOMICS is disabled.
For cpus_have_cap(ARM64_HAS_LSE_ATOMICS) case and no-LSE-ATOMICS case, the
following three tests: "./test_verifier", "./test_progs -t atomic" and
"insmod ./test_bpf.ko" are exercised and passed.
Signed-off-by: Hou Tao <houtao1@huawei.com>
Now atomic tests will attach fentry program and run it through bpf_prog_test_run_opts(), but attaching fentry program depends on bpf trampoline which is only available under x86-64. Considering many archs have atomic support, using raw_tp program instead. Signed-off-by: Hou Tao <houtao1@huawei.com> Acked-by: Andrii Nakryiko <andrii@kernel.org>
925fe58 to
9d5b5d4
Compare
Pull request for series with
subject: bpf, arm64: support more atomic ops
version: 3
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=611843