From: "Alexei Starovoitov" <alexei.starovoitov@gmail.com>
To: "Yazhou Tang" <tangyazhou@zju.edu.cn>, <bpf@vger.kernel.org>,
<eddyz87@gmail.com>
Cc: <daniel@iogearbox.net>, <john.fastabend@gmail.com>,
<andrii@kernel.org>, <martin.lau@linux.dev>, <song@kernel.org>,
<yonghong.song@linux.dev>, <kpsingh@kernel.org>,
<sdf@fomichev.me>, <haoluo@google.com>, <jolsa@kernel.org>,
<tangyazhou518@outlook.com>, <shenghaoyuan0928@163.com>,
<ziye@zju.edu.cn>
Subject: Re: [PATCH bpf-next 0/8] bpf: Add UHMUL and SHMUL instructions
Date: Thu, 17 Sep 2026 18:00:06 +0000 [thread overview]
Message-ID: <DLHSD07GRG0W.16CFRV44ZE1DD@gmail.com> (raw)
In-Reply-To: <20260917041712.1860722-1-tangyazhou@zju.edu.cn>
On Thu, Sep 17, 2026 at 12:17 PM Yazhou Tang <tangyazhou@zju.edu.cn> wrote:
> Patch 8/8 uses raw bytecode for UHMUL and SHMUL because LLVM support has
> not been merged yet. Once it is available, the raw encodings can be
> replaced with the uh*= and sh*= mnemonics. A draft LLVM implementation
> is available at:
>
> https://github.com/ADSWT518/llvm-project/tree/bpf-hmul-insn
>
> We plan to finalize and submit it as an LLVM pull request after the
> kernel-side ISA changes are merged.
Pls send the LLVM PR now. It needs to be reviewed together
with kernel side.
I think it enables ISD::MULHU/MULHS legal under -mcpu=v4.
Does it mean that existing programs might generate new instructions
and stop loading on current kernels?
If so, we'd have to introduce -mcpu=v5 for that
and extra flag like we did for other insns.
> arch/arm64/include/asm/insn.h | 4 +
> arch/arm64/lib/insn.c | 6 +
> arch/arm64/net/bpf_jit.h
| 6 +
> arch/arm64/net/bpf_jit_comp.c | 15 +-
> arch/loongarch/net/bpf_jit.c | 3 +
> arch/mips/net/bpf_jit_comp32.c | 3 +
> arch/mips/net/bpf_jit_comp64.c | 3 +
> arch/parisc/net/bpf_jit_comp32.c | 3 +
> arch/parisc/net/bpf_jit_comp64.c | 3 +
> arch/powerpc/net/bpf_jit_comp32.c | 3 +
> arch/powerpc/net/bpf_jit_comp64.c | 3 +
> arch/riscv/net/bpf_jit.h | 5 +
> arch/riscv/net/bpf_jit_comp32.c | 3 +
> arch/riscv/net/bpf_jit_comp64.c | 18 +-
Pls cc arm64, riscv or other arch JIT maintainers on respin.
We need acks from them.
next prev parent reply other threads:[~2026-09-17 18:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 4:17 [PATCH bpf-next 0/8] bpf: Add UHMUL and SHMUL instructions Yazhou Tang
2026-09-17 4:17 ` [PATCH bpf-next 1/8] " Yazhou Tang
2026-09-17 5:22 ` bot+bpf-ci
2026-09-17 6:43 ` Yazhou Tang
2026-09-17 17:04 ` Alexei Starovoitov
2026-09-18 9:26 ` Yazhou Tang
2026-09-17 4:17 ` [PATCH bpf-next 2/8] bpf, x86: JIT UHMUL and SHMUL on x86-64 Yazhou Tang
2026-09-17 4:17 ` [PATCH bpf-next 3/8] bpf, arm64: JIT UHMUL and SHMUL Yazhou Tang
2026-09-17 4:17 ` [PATCH bpf-next 4/8] bpf, riscv: JIT UHMUL and SHMUL on RV64 Yazhou Tang
2026-09-17 4:17 ` [PATCH bpf-next 5/8] bpf: Reject UHMUL/SHMUL in unsupported backends Yazhou Tang
2026-09-17 4:17 ` [PATCH bpf-next 6/8] bpf: Refactor ALU instruction variant validation Yazhou Tang
2026-09-17 4:17 ` [PATCH bpf-next 7/8] bpf: Add verifier support for UHMUL and SHMUL Yazhou Tang
2026-09-17 4:17 ` [PATCH bpf-next 8/8] selftests/bpf: Add bytecode tests " Yazhou Tang
2026-09-17 18:00 ` Alexei Starovoitov [this message]
2026-09-18 9:37 ` [PATCH bpf-next 0/8] bpf: Add UHMUL and SHMUL instructions Yazhou Tang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DLHSD07GRG0W.16CFRV44ZE1DD@gmail.com \
--to=alexei.starovoitov@gmail.com \
--cc=andrii@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=martin.lau@linux.dev \
--cc=sdf@fomichev.me \
--cc=shenghaoyuan0928@163.com \
--cc=song@kernel.org \
--cc=tangyazhou518@outlook.com \
--cc=tangyazhou@zju.edu.cn \
--cc=yonghong.song@linux.dev \
--cc=ziye@zju.edu.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox