From patchwork Tue Aug 15 15:41:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Kuohai X-Patchwork-Id: 13353894 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F1CA412B98 for ; Tue, 15 Aug 2023 15:21:12 +0000 (UTC) Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D7181990 for ; Tue, 15 Aug 2023 08:21:11 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.169]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4RQFN16bNMz4f3pJ6 for ; Tue, 15 Aug 2023 23:21:05 +0800 (CST) Received: from k01.huawei.com (unknown [10.67.174.197]) by APP3 (Coremail) with SMTP id _Ch0CgDH68Pgl9tk7KrwAg--.42348S2; Tue, 15 Aug 2023 23:21:05 +0800 (CST) From: Xu Kuohai To: bpf@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Alexei Starovoitov , Andrii Nakryiko , Catalin Marinas , Daniel Borkmann , Martin KaFai Lau , Will Deacon , Mark Rutland , Yonghong Song , Zi Shen Lim Subject: [PATCH bpf-next 0/7] Support cpu v4 instructions for arm64 Date: Tue, 15 Aug 2023 11:41:51 -0400 Message-Id: <20230815154158.717901-1-xukuohai@huaweicloud.com> X-Mailer: git-send-email 2.30.2 Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-CM-TRANSID: _Ch0CgDH68Pgl9tk7KrwAg--.42348S2 X-Coremail-Antispam: 1UD129KBjvdXoWruFyfur1xKry3Xr4kAF4DCFg_yoWkXrXEkw saya4v93WrAF1SyFyUC3WxXryDCwsIqry7Gr13tr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NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: bpf@iogearbox.net From: Xu Kuohai This series adds arm64 support for cpu v4 instructions [1]. [1] https://lore.kernel.org/all/20230728011143.3710005-1-yonghong.song@linux.dev/ Xu Kuohai (7): arm64: insn: Add encoders for LDRSB/LDRSH/LDRSW bpf, arm64: Support sign-extension load instructions bpf, arm64: Support sign-extension mov instructions bpf, arm64: Support unconditional bswap bpf, arm64: Support 32-bit offset jmp instruction bpf, arm64: Support signed div/mod instructions selftests/bpf: Enable cpu v4 tests for arm64 arch/arm64/include/asm/insn.h | 4 + arch/arm64/lib/insn.c | 6 ++ arch/arm64/net/bpf_jit.h | 12 +++ arch/arm64/net/bpf_jit_comp.c | 91 +++++++++++++++---- .../selftests/bpf/progs/test_ldsx_insn.c | 2 +- .../selftests/bpf/progs/verifier_bswap.c | 2 +- .../selftests/bpf/progs/verifier_gotol.c | 2 +- .../selftests/bpf/progs/verifier_ldsx.c | 2 +- .../selftests/bpf/progs/verifier_movsx.c | 2 +- .../selftests/bpf/progs/verifier_sdiv.c | 2 +- 10 files changed, 103 insertions(+), 22 deletions(-) Acked-by: Florent Revest Tested-by: Florent Revest