From patchwork Tue Aug 27 13:39:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lin Yikai X-Patchwork-Id: 13779583 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2049.outbound.protection.outlook.com [40.107.215.49]) (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 6C2A419D076; Tue, 27 Aug 2024 13:40:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.215.49 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724766031; cv=fail; b=epBiXC/IoHZVw/5Rr4yg8se113IbG1/SG6yz8NTZpS3VbxQXX+oEFqmdVr95PvwAjkqX8gbablcocTp8kQ/t8wt7oqr3BwHGA25gTDTTWbtnpDwTypdkv2j3ir/2eQl6o46b54+2AbS1XOCD23IFtXZ4/B+isDYILC29AF8sPiI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724766031; c=relaxed/simple; bh=BFqWpLOoAw/8Bd699TdfwxHdwjHP6U8HqIZEcjuMvag=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=KDuibinRcCwvoN0tcfZOberdamTaC88sA5IA9ItG+CH2wjSz4EVAWHtQx8XHLafz3GwxMouWosLzOO02GyF56nxd79kEPHBy9y3hljFAnzQwqhWCDKob/77Kl8ROrFxVcMqFk2CnTjIIEeteU1OPvdsNBWMdM0srcBxc9pgwvCE= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=vivo.com; spf=pass smtp.mailfrom=vivo.com; dkim=pass (2048-bit key) header.d=vivo.com header.i=@vivo.com header.b=jC6m2NcK; arc=fail smtp.client-ip=40.107.215.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=vivo.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=vivo.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=vivo.com header.i=@vivo.com header.b="jC6m2NcK" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=S6VJF9VdhTygyOYDAUsYM7nzqnWTE+4T4r+q2rfmv0X13qmmmw7XeXjQ0v8AnCvmsqAY2hp7dGSDs0LpI5hUmOFF/24NKQrnnegBxFWe3Uch30GLP35lFeEBkMpUOshtT7UkAhAG1WoWA+G+pITCEtDVxxU3lqL1+C7EuiuQAj3/hbB0jnVy0Q/45HIBa75e/bx9z9IwhLME+Mx9xoDm3oPOXvs5dO2OJguLf6809L549Xopqu81yWszHtMb2VlWyFrodKQf6IbBnD3CJ+ay/te6TM9G+c22ECHD7v8uAZK6paM7hHzQvHn7BBVDWrvLoxd1ogS8b8uJn2i6QGiruQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=uWjx6iKGK+55ymShoGdmBxYbbNWzmGzYX88IH8Zmqt4=; b=nLX39ETX3lbQfWTeu02TlqpNaoqQf5ZzvRbzqwLzau7wwI3mzI1umqVFjRJ1L+MMGAIPJY58dY0DYH4nlJHcT5x4s5RSy5MBY5sD8qUzoMvdzwaoySXZIdWSw6rb6QC2DddjxehefsEjB/DMXT6PJqxUYeU5Ft+onFMWc8VWxQ10kDiVQACFSFftDlJ1Va7hnOssYls5GC90izUt1+loqMhXhq2c6gbkPFp1gEXVavO3c7qsZqJ0bgLenU5lGVctI1RD3AR97GOjGuo+lH1xLMaUg33+6FG0BO7jtd7uZgQGgrsUzL7KwKAauAHWTePerXkV2Xi/KxA/ZcVuXO95rQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uWjx6iKGK+55ymShoGdmBxYbbNWzmGzYX88IH8Zmqt4=; b=jC6m2NcKCo96+e1YC7MzduDYGV/2qey2ru5G151oUZtnIU5OF052D0C4mwzEtTRLedqltDZn8wCgW8qzN5CAx0lbs3ydAu/xwmyKrmcNpCQrSBYwevuu050lo+63YJGu9G3+mDtObikczQEJEz2j8u5O9koF4xNoRDQ4CeeT6W18/eN0NCx774Fq7R0noykA4kvIid3rOZNAyNtujcaZSwHNu3w1+nRbGDI7Ls3Sk2B9U0hLrquTqWz8Jo2NYGwBwcDx0Bn28NEgsEdpjcZvwjt89ZRKlW1hzH9+XVomcO/IGsbC3ulaZqWYV7FTnFJ2LDqIHei9FEKQ/bpsVsUTag== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEYPR06MB5913.apcprd06.prod.outlook.com (2603:1096:101:da::16) by KL1PR06MB6791.apcprd06.prod.outlook.com (2603:1096:820:ff::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.25; Tue, 27 Aug 2024 13:40:22 +0000 Received: from SEYPR06MB5913.apcprd06.prod.outlook.com ([fe80::f049:a716:8200:c4a1]) by SEYPR06MB5913.apcprd06.prod.outlook.com ([fe80::f049:a716:8200:c4a1%4]) with mapi id 15.20.7897.021; Tue, 27 Aug 2024 13:40:21 +0000 From: Lin Yikai To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan , Nick Terrell , bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Cc: opensource.kernel@vivo.com, yikai.lin@vivo.com Subject: [PATCH bpf-next v1 0/2] Enable vmtest for cross-compile arm64 on x86_64 host, and fix some related issues. Date: Tue, 27 Aug 2024 21:39:57 +0800 Message-Id: <20240827133959.1269178-1-yikai.lin@vivo.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: SG2PR01CA0141.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::21) To SEYPR06MB5913.apcprd06.prod.outlook.com (2603:1096:101:da::16) Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEYPR06MB5913:EE_|KL1PR06MB6791:EE_ X-MS-Office365-Filtering-Correlation-Id: 3b0903ef-ea16-428c-d502-08dcc69dcba9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|7416014|376014|366016|1800799024|921020|38350700014; X-Microsoft-Antispam-Message-Info: VWMER94a9G6u0FDG47aWquHJTTHYMEy5DPYn/OfK6+feHP/JsKbLWKzOLdiej6zYKRMKw+3GaeAsGSrzunE5IiJ3l3L5Fe4lt7lvwK+PbEFhtInx9xCXF8eYV6bob2+hHmtz1QadqpYzFLjeQAPL5Z0w7nMi93A3dE5LvO+Jqm4P3f1c1yXWqQAE3s9/jzqW2P0NYURWhBFBtb2lXOU/h7kNPNj0ZX32oxIn+BUkxH9zXklnW7gpI/kaazU8dBjvEWdlKlgwWPZfH6x7I7Fa6ysCBc5pDf2fotgevbfEPuHR2u1gjSMcHTf6VKs8XXzfVVOY5TtCcjwWbZ/Yefr0PbHaEgq9yrCr7s4Sy1uaVVRbSC1kn0L5mZRPc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-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEYPR06MB5913.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(52116014)(7416014)(376014)(366016)(1800799024)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: DBnDDd/NKJIcH+b0bRc8T1CIX17+skr1I82+QifyqT6jYVCHYbC+s1To8lhpsNbR4LU0ycNTwYOKNCcaLOZV9jGG7CWVbSISu7+JHAiCWjmvsi7/Rqq5o5fBHsBv/V6jAUvcPUOAMVO7u1z3ka+TVb4XwX2s+jCxN5M6t0oqVwLtJjL/KhoR81Nx64LyBaZJRVp1hXOIWQqWnczQ4pZJRQNvMEjxJSS+hhcjJ/7HubWcyihs/9ibXNgsQHwt652BjqlGryv5DYKL/Wc13VNJRDDfCmAM7qBClQY6u2DPKdubUI0l7F3v6jTtQMC9aNoQZGpGG8PxdtjoLOe67B25CK+PX7BTrAMyTomzr6dLEWVpQ/T/3vTrh8igMrvB2NsyMv5p3VLnxhxQ09wiHmoLIUCzMLeL7Rv1pJfKrK08jr0a/L7Kn3Fi7HqxaKjNdgsAlz+NmfUW/rZBzRAGujNYuOKLHV5SoZHGWmlQ9e0T6SRA84rBUm59ETMqKw6GBiLPiCz0w+UIi/LjozuCg9hF1ewJM2ubMXEz2rtirf5DWImJUqR71n2kwsEGzD5n5jYBns8B/jXYKUJbw2aiXeqGIeJcdcgZZqy+q2rYvRdho6W7dINrN0LfqmfBnz2py4yz3wpE07/Nk51wIE3EgnGPXhk6ES3nV/trMEQVHfGgSB4TBuvxagObmkWv4/qNuilTqYLJEwnu5S7kR+CV1rQHZCJKTnFFjs2hcGdl5Ev0HlMNjfoQ4pSte7jqOetbs4Nq+JYo4sVwJHQ2chxMVYRWNStpO7pw91uS+qa0qUpHHa27bI3jBIAteQ0k0rukkb2sfs78g+oA2SVL78f9lHcClm6N8L03nL25syRWTs8eUGHDbSp3jcj4sC5FiR02MRN44Hijm8d6GVJZLXG9DYSKOf4M84maDlmeeGaE/evGkAZ1VpkHXt/fAhnpRGoBrgWeEjR6t88640nDOeGJtTac3MLSu2ZIQOaVGTIZxGQDZpNVinDif49yX9ewZKEaeTH+PLo+I1Pz9LMb2Kp0PqqWd74ggYQVxY1gF6fsI7tWWXFOaa4vBVvuC738kxrZxWczq1ekypvjkdbrnAmTt1MjteJAwX3b9Cv++3mjxnSGXDrfL/W4A3t01NJyfWR5mcJU6wuBuDKfOgEWqfbRv14yeWpsM5SYeTJ/m7tGnH43/XrFW7uFRYD/P6ypI6tt4OcO8BxQiavB6x0SDrvZAtTLXQZDthVotN7L+mEdypjQFMUqkH3S4AnECbfkAsjrvxP8BGC5F84JXJBsyU/PClKTWVuIhaFPUJTtTl4ZavnslYefew9+v6wubMIhrw64GBmE7wvNh3sCqcBotxny+xgb9hxP0EDCTul2x8uPa+015ByV+NdZLuDB8M80x/uEn0r8RCknCy6A2nOalf+p0arMoA7+Rzap6QrCllhzQAxGpHEs0UdCNJB4ErdhmhAbL9YBHc4VkY98aTlQNlyvFxPvBKKwurLR8W/rYJBjfYxyvBZZR5C8d0qYngwCb1BA76xvYazH9F1OCdaUt96qdzO6e8/8mStsvHWRj3O8IclqaKC8KD+g3p1qiavhQyRBCaFY X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3b0903ef-ea16-428c-d502-08dcc69dcba9 X-MS-Exchange-CrossTenant-AuthSource: SEYPR06MB5913.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Aug 2024 13:40:21.0852 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: PxXjN1sP2/eGQ3S7kktBlA58e7TzB6czJe0yQQcrstx3zPSz5uRG4jSRTAMQ5pA3e4n4HW8/lVDeXEoHTeDMMA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR06MB6791 Enable vmtest for cross-compile arm64 on x86_64 host, and fix some related issues. I have verified the patch for x86_64 with the target arch of 'x86' or 'arm64'. v1: - patch 2: - [1/2] Update "vmtest.sh" for cross-compile arm64 on x86_64 host. - [2/2] Fix cross-compile issue for some files and a static compile issue for "-lzstd" Lin Yikai (2): selftests/bpf: Update "vmtest.sh" for cross-compile arm64 on x86_64 host. selftests/bpf: Fix cross-compile issue for some files and a static compile issue for "-lzstd" tools/testing/selftests/bpf/Makefile | 12 ++++++++- tools/testing/selftests/bpf/README.rst | 12 ++++++++- tools/testing/selftests/bpf/vmtest.sh | 37 +++++++++++++++++++++----- 3 files changed, 53 insertions(+), 8 deletions(-)