mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/5] bpf, x86: Extend CPUv4 instruction support in the i386 JIT
@ 2026-09-15  2:13 Nicholas Dudar
  2026-09-15  2:13 ` [PATCH bpf-next 1/5] bpf, x86: Add support for BPF_MOVSX " Nicholas Dudar
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Nicholas Dudar @ 2026-09-15  2:13 UTC (permalink / raw)
  To: ast, daniel, andrii, eddyz87, memxor, udknight, tglx, mingo, bp,
	dave.hansen, x86
  Cc: martin.lau, song, yonghong.song, jolsa, emil, ihor.solodrai, hpa,
	bpf, linux-kernel, visitorckw

Add MOVSX, MEMSX, 32-bit-offset unconditional jumps and unconditional
byte swaps to the i386 JIT. MOVSX currently produces ordinary moves;
the other instructions are rejected by the backend.

The load-emitter extraction is separate from MEMSX so the code movement
and signed-load handling can be reviewed independently. MOVSX comes first
because context-access conversion can lower signed loads into ordinary
loads followed by MOVSX.

The separately posted i386 SDIV/SMOD work is independent of this series:
https://lore.kernel.org/bpf/20260731002950.179573-1-main.kalliope@gmail.com/

Tested on QEMU i386 with CONFIG_BPF_JIT_ALWAYS_ON=y. The full test_bpf
suite improves from 845/216 to 862/199 pass/fail: the 17 newly passing
cases cover these instructions, with no other result changes. Additional
verifier-loaded programs check full-width results and ordinary controls.

Of the remaining 199 failures, 8 are ALU32 SDIV/SMOD result mismatches.
The other 191 fail during program creation or runtime selection: 149
atomic cases, 37 ALU64 division/modulo cases (including a mixed ALU test),
4 long conditional jumps and 1 jump/gap stress case.

All five intermediate JIT objects build. A standalone emission harness
checks ordinary-load byte equivalence across the extraction and compares
MOVSX staging with the earlier emitter, accounting for the removed
self-moves. No physical hardware was tested.

Nicholas Dudar (5):
  bpf, x86: Add support for BPF_MOVSX in the i386 JIT
  bpf, x86: Extract the i386 JIT load emitter
  bpf, x86: Add BPF_MEMSX support to the i386 JIT
  bpf, x86: Add BPF_JMP32 | BPF_JA support to the i386 JIT
  bpf, x86: Add unconditional byte swap to the i386 JIT

 arch/x86/net/bpf_jit_comp32.c | 227 ++++++++++++++++++++++++----------
 1 file changed, 161 insertions(+), 66 deletions(-)


base-commit: 29fcf9ce4bbdf4cc339def776860e1c0095bca98

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-09-15  3:12 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-15  2:13 [PATCH bpf-next 0/5] bpf, x86: Extend CPUv4 instruction support in the i386 JIT Nicholas Dudar
2026-09-15  2:13 ` [PATCH bpf-next 1/5] bpf, x86: Add support for BPF_MOVSX " Nicholas Dudar
2026-09-15  3:12   ` bot+bpf-ci
2026-09-15  2:13 ` [PATCH bpf-next 2/5] bpf, x86: Extract the i386 JIT load emitter Nicholas Dudar
2026-09-15  3:12   ` bot+bpf-ci
2026-09-15  2:13 ` [PATCH bpf-next 3/5] bpf, x86: Add BPF_MEMSX support to the i386 JIT Nicholas Dudar
2026-09-15  2:13 ` [PATCH bpf-next 4/5] bpf, x86: Add BPF_JMP32 | BPF_JA " Nicholas Dudar
2026-09-15  3:12   ` bot+bpf-ci
2026-09-15  2:13 ` [PATCH bpf-next 5/5] bpf, x86: Add unconditional byte swap " Nicholas Dudar
2026-09-15  3:12   ` bot+bpf-ci

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®