From patchwork Sat Oct 7 06:55:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liming Wu X-Patchwork-Id: 13412206 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 288673C0D for ; Sat, 7 Oct 2023 06:56:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=jaguarmicro.com header.i=@jaguarmicro.com header.b="ni413uTq" Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2069.outbound.protection.outlook.com [40.107.215.69]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C184BD; Fri, 6 Oct 2023 23:56:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kcmWn73NH/rVMhw/IkIFC85s0jMGle0p11r5FcEwCWbeeMjp30bqjOaDlhsved+IEkVTOiYojGjGCOMi9ciu8PNFyWYz0qILd4ZfBpVPLQY6V3/OBxt/lYuCHQ0zP8J49RPr+5Zr4icGuT1Jt2iXzdD1iKJRYPuc6xPkaK1GSMVo/DsgWdDZ101RXnKrJbyVkdMxTpGhAaOUOsT6UcEjRHUb7vXNHNvsFN0buZRZ9xgajIvh4+xFrluJQ14xzNgfQLcNAXJw9BUtTeizDYdao1+nzJHSAbUwav/P6oZzU1ceaUB7WiulHZHh6yaXzQW9tVuMJJQnovdkcgtUGZTKmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=BmAQQl8A0PCsUojiB3YSOfAuymoeUEitnUHJzywMjMY=; b=hUNFkve3v18jVluqmMjUoSFiu5OZTZdjLsD1VP31L2OWcYsJ66c1SYjagxNI83U4MXeJJsfCERBxYIz4qEJgF9XhOjQMunQdQWHb7kvdbUnkF9nH4u8qkzIru9FD215dWMKInyJ5J42+62w3zN03Rs95WnRYkcwu4GF5bcXoAMHyDR1jC1UxhX5qVR2Rh9wb3srxxEN1xL0I06ESwzrmjgOP1sKSNqivgwxKYG+DQq6DvyG8ctML16bnIl2rRiFb5W7m90v7LR6c9VE5WCN2JvlQTHN1+LL89nJ+tVs8/9Y0uT2Yok/F2vKfa2uIGDbht7LSxc2e/53wLEly8SmdqQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=jaguarmicro.com; dmarc=pass action=none header.from=jaguarmicro.com; dkim=pass header.d=jaguarmicro.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jaguarmicro.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BmAQQl8A0PCsUojiB3YSOfAuymoeUEitnUHJzywMjMY=; b=ni413uTqNxlw65q8g1WBi5WYN4ope1u1IugbcVoHFwbzic0ZOwToku4hmnegEmJemQGp+uK4xpyGeKYvwbNf8BdDwJPiRNX5Rneiw2MksJpXjcCFK/P2Z7iXzhYo8stfCEb/wJp4n20JxI0wQSY3zriSbr8zc+0uzPv2d0AxpQv5mOYWuQTTgtlJGuXTzx9QGkxYa7sMRibrfRQW8RXMAkQm/mt7/m+nOHc+Shq8PhCtc8IFMEJ0SGndmh9URzVE8TAJnLLQniXrotdNbJDTenW5+W4PXhgWDhlaAC5Bt3Anvd42xNo8ZnClifTerELx5lClc2iuuFem/9Lk3jjDqw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=jaguarmicro.com; Received: from PSAPR06MB3942.apcprd06.prod.outlook.com (2603:1096:301:2b::5) by TYZPR06MB6745.apcprd06.prod.outlook.com (2603:1096:400:45a::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.38; Sat, 7 Oct 2023 06:56:04 +0000 Received: from PSAPR06MB3942.apcprd06.prod.outlook.com ([fe80::e5ee:587c:9e8e:1dbd]) by PSAPR06MB3942.apcprd06.prod.outlook.com ([fe80::e5ee:587c:9e8e:1dbd%4]) with mapi id 15.20.6838.033; Sat, 7 Oct 2023 06:56:04 +0000 From: liming.wu@jaguarmicro.com To: "Michael S . Tsirkin" , Jason Wang Cc: kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Liming Wu Subject: [PATCH v2 1/2] tools/virtio: Add dma sync api for virtio test Date: Sat, 7 Oct 2023 14:55:46 +0800 Message-Id: <20231007065547.1028-1-liming.wu@jaguarmicro.com> X-Mailer: git-send-email 2.34.0.windows.1 In-Reply-To: <20230927111904-mutt-send-email-mst@kernel.org> References: <20230927111904-mutt-send-email-mst@kernel.org> X-ClientProxiedBy: SI2PR02CA0050.apcprd02.prod.outlook.com (2603:1096:4:196::11) To PSAPR06MB3942.apcprd06.prod.outlook.com (2603:1096:301:2b::5) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PSAPR06MB3942:EE_|TYZPR06MB6745:EE_ X-MS-Office365-Filtering-Correlation-Id: d4f1d500-c40f-47ff-a437-08dbc7027934 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PqOhxHxAd2s811+oko7SrSKHuGTxtjtKq3gy/veBMuZPJoe3qRjPlPh5oJwMaAEfa06bI3FXnb8GLuyk1eMRuJmTADD67JeKKaEAyTEJZZqfajvhtq8vqE+ORgSlMHcMDaMePRXIxDKCGmDQuz4Q8jAVJY4U5CTDmAGMX8b12lCq/CuJ2npxP237x3JzJ0L43EiYXDWE+qAXf/CgKrMSR9iPIBSuZXqJisr31UhFcDYQw3BF1QPgeTEaURqvBVuwF3v+ukgM0Fb97uvLZJs1S+BHS0+iFIsq5Gxt4uuJHqYeThAyShWTxZWDruQqx4WgDGIrGKkUUr+RMXhOcWbDdvLX6RF2OrPVuH8gzXS7LurxaK9tuyskRhSXSz/Y2AoZNuuv/fnW4V/F7kLgCMsfpm8u99lOWGps7nG+Yo2bO+sOj7O2hCb2dEAv03Cobruw+tl4Z/PshLbuChQrfvw4JDb2Qxk1sRVRAeeh7mHyEMOatW4TsujpjLBdwsFOcWy7nWN3Ux5fNHfYHtXYXuu49JrJGaUPh0iwwus7zgTvq/MoFw0UXro4u1En625AZKYKcyESR7QSg2hvEIvnrexoTTfZO081CdDROHS6TEB0AMJP3o4RifbduHXbdOb3JrTb X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PSAPR06MB3942.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(136003)(396003)(376002)(346002)(39830400003)(230922051799003)(64100799003)(451199024)(186009)(1800799009)(2906002)(4326008)(8936002)(5660300002)(8676002)(86362001)(36756003)(316002)(41300700001)(6636002)(66946007)(66556008)(66476007)(110136005)(9686003)(6486002)(6512007)(478600001)(6666004)(2616005)(38100700002)(38350700002)(1076003)(26005)(107886003)(6506007)(52116002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ayjCmb2+9IZR6IrAZ9de4Cvsj6BQD0QnerNq8r8IW6AySnkHLG8yuv7tsw/61+FjHX2oY9WRcsIh4jvPrxnIdHgfyVfGO01PUs3cEDPg0SF6kixsJwSjuI7tvEqD3yyddjNtS0soQY5HDdjylmFgLkbs37WQlp/AJ9LH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6CkxdijnQh7TGm71BIWp1mtIeoSrcR21H02lSkzu50IU71J+daqNSvamRSikuAfvqQZe7v9nv6guY3ZkecjzMOUlPvgPa65qPoApLeButUqW+pw3ux7ztc19BfhdqrBm8X3lUYx4crK0Wp49HRTRlZRMRUrtr/4ALe423h4aVvULcDaO0sd/wt5Q3E7GDz99TPeKbZkcbcq5hHCTAEf9ewZttgDpyBE3Eu+um1knPl44pmV3TBI2gF4spbdBAfLV4qdx5mCa5Nt6s0EPRk2fY9xMCAff2gO0hm1lfta4iFIOhb3UCgpxRQzVchVeR7qBJCY9zmaKR6PmccEf5pylNY+L9UcDeP/MehFhrecUlxAZcgVol/QItnIIA0KOA== X-OriginatorOrg: jaguarmicro.com X-MS-Exchange-CrossTenant-Network-Message-Id: d4f1d500-c40f-47ff-a437-08dbc7027934 X-MS-Exchange-CrossTenant-AuthSource: PSAPR06MB3942.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2023 06:56:04.2418 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 1e45a5c2-d3e1-46b3-a0e6-c5ebf6d8ba7b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: LekE///l/2t/emQ5tachb38OXYW27x+mM0rETfEwh2Eh/QM+5GhyDNTwvPpA0f7Gsuc+tjyalG/G5VN/MUVfM26BuFm36kQI6qgY+W4IYY4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB6745 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net From: Liming Wu Fixes: 8bd2f71054bd ("virtio_ring: introduce dma sync api for virtqueue") also add dma sync api for virtio test. Signed-off-by: Liming Wu --- tools/virtio/linux/dma-mapping.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tools/virtio/linux/dma-mapping.h b/tools/virtio/linux/dma-mapping.h index 834a90bd3270..822ecaa8e4df 100644 --- a/tools/virtio/linux/dma-mapping.h +++ b/tools/virtio/linux/dma-mapping.h @@ -24,11 +24,23 @@ enum dma_data_direction { #define dma_map_page(d, p, o, s, dir) (page_to_phys(p) + (o)) #define dma_map_single(d, p, s, dir) (virt_to_phys(p)) +#define dma_map_single_attrs(d, p, s, dir, a) (virt_to_phys(p)) #define dma_mapping_error(...) (0) #define dma_unmap_single(d, a, s, r) do { (void)(d); (void)(a); (void)(s); (void)(r); } while (0) #define dma_unmap_page(d, a, s, r) do { (void)(d); (void)(a); (void)(s); (void)(r); } while (0) +#define sg_dma_address(sg) (0) +#define dma_need_sync(v, a) (0) +#define dma_unmap_single_attrs(d, a, s, r, t) do { \ + (void)(d); (void)(a); (void)(s); (void)(r); (void)(t); \ +} while (0) +#define dma_sync_single_range_for_cpu(d, a, o, s, r) do { \ + (void)(d); (void)(a); (void)(o); (void)(s); (void)(r); \ +} while (0) +#define dma_sync_single_range_for_device(d, a, o, s, r) do { \ + (void)(d); (void)(a); (void)(o); (void)(s); (void)(r); \ +} while (0) #define dma_max_mapping_size(...) SIZE_MAX #endif From patchwork Sat Oct 7 06:55:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liming Wu X-Patchwork-Id: 13412207 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 F3CA479D2 for ; Sat, 7 Oct 2023 06:56:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=jaguarmicro.com header.i=@jaguarmicro.com header.b="npBMmhya" Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2070.outbound.protection.outlook.com [40.107.255.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43EC5101; Fri, 6 Oct 2023 23:56:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e02quNJlg2Twk1zXbLJUxMCdnJjH1+LmrdqTrg6yV3QJhPFdFwIh7tAbKUknyZ3uejdWGBHDM0E0oomldcnWH4Gk7yipuMYUGSWtX+9Ivsfvw+77H2E7Zw8cw2LJgiUAPcRG/c0l6i9j3g4cFOUgV/8sYCqhG7D1xOy5ULAZRMP91O+3557M/WsPhNTJ5761zd/c0Tf9lpXsZtD9nqM+R08VsWvFt6LBpmFZvsVHui8NF/qx1NfGBTFEkUEiPwWrRgoOQolNitk1rJUdZap1TapS8eGgyjf7Q3Zi7n0nCcHYoMZk6RhW7rF2IJ1fEGgbPKqhYfU3LfpxO0XaPZuaEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=XEg3U4C1ZpQnUuz6N6p7iOywx8McgaA7IUuwdRf5TLw=; b=BR/rEZ5BkAcmsVcKUs5FMD+EnsN3RoB7HlvitCnXj72HO211xqQ8mdqlA/E8s4WPNJZCrUIAExEUGwjgiooxhehjshtRq6LM6tGR7M/ZqGuNVpleunO3gQyLZkBdFIDixQ413AfkeQkmkfxy+8MpCdLnUz3IDOVy28xWCnCjHJNO53HsvUngxqlwTCWI/IIY1Yyk1jFiiWhjIonIE7xsZrFonFNsqACPxx62UUeO+dl7xa6gzsGbm3zT8dIMHw+DtZ9Uj6RNQ81RUxClALy1sob0kdMUYqgEyQNY+QQF88UoPhTRQyjQcUEC7eSi9gNoa3O5UqoHAOihmvFxhCFBCA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=jaguarmicro.com; dmarc=pass action=none header.from=jaguarmicro.com; dkim=pass header.d=jaguarmicro.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jaguarmicro.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XEg3U4C1ZpQnUuz6N6p7iOywx8McgaA7IUuwdRf5TLw=; b=npBMmhya7jXxt2BaIxg6bGe0KaxhZRzvCWMJthqMSeQF+/sR0HLgL0ikR7dHRg4N4jhPnpYqnF0qgMkdWAF9jWZhpSHHwH7uCe61/anvXSpc5sZ0IwHEy4+urYWBg1CpgtAtw30hZNDxn5PGWWI3ve3TruRqncna862iKWBNhEPe5qVRATQr7wbq9EfQ2aqzWGjYThRB7fjvi0ZocoPG/1uX/UEMUE6ujYl7SJkDuY4sDQ1Mn5i+84Ui7/0jf6zms7wvjksqTPRgtVDH4d7IoQtAP90mWsFXznMK962el4pv0gm+2x3FR3N5trR/GvpEa88waJ5YYD5pUP1D16s3yQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=jaguarmicro.com; Received: from PSAPR06MB3942.apcprd06.prod.outlook.com (2603:1096:301:2b::5) by TYZPR06MB6745.apcprd06.prod.outlook.com (2603:1096:400:45a::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.38; Sat, 7 Oct 2023 06:56:20 +0000 Received: from PSAPR06MB3942.apcprd06.prod.outlook.com ([fe80::e5ee:587c:9e8e:1dbd]) by PSAPR06MB3942.apcprd06.prod.outlook.com ([fe80::e5ee:587c:9e8e:1dbd%4]) with mapi id 15.20.6838.033; Sat, 7 Oct 2023 06:56:20 +0000 From: liming.wu@jaguarmicro.com To: "Michael S . Tsirkin" , Jason Wang Cc: kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Liming Wu Subject: [PATCH v2 2/2] tools/virtio: Add hints when module is not installed Date: Sat, 7 Oct 2023 14:55:47 +0800 Message-Id: <20231007065547.1028-2-liming.wu@jaguarmicro.com> X-Mailer: git-send-email 2.34.0.windows.1 In-Reply-To: <20231007065547.1028-1-liming.wu@jaguarmicro.com> References: <20230927111904-mutt-send-email-mst@kernel.org> <20231007065547.1028-1-liming.wu@jaguarmicro.com> X-ClientProxiedBy: SI2PR02CA0050.apcprd02.prod.outlook.com (2603:1096:4:196::11) To PSAPR06MB3942.apcprd06.prod.outlook.com (2603:1096:301:2b::5) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PSAPR06MB3942:EE_|TYZPR06MB6745:EE_ X-MS-Office365-Filtering-Correlation-Id: 85edcbce-23c0-40b7-c2f1-08dbc70282c7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3tIYaEjRzh3BuaySEjwDCNGNaWQ1nOdjile8U1OUQFjLNJ3ifVR5H/yQLKTE4RShthqN3FsCaV8gY0JxxVBmAzwewbXK62fzslXxAPvQQ0yEcW85yClq+uXLu8aNLk12oFDH5RbuI5ukr8wBaQNXsvObD4Q9QBSrfeGoOUKBlKvieNns4walty1UkLKK4i8wpt9dtPC3TOpSqG1Kk/TTP2QnEZuJlfcY1WwFwpSLtxzbwUkWyg28xfpthdp6Ib/fiksbGIAw+CD27iX/rxinygGTDX5zQa2IhlwQdRotWG4lfUk9Q0GuQyO/5mFelo3+aw1K6PLyaQLCJ1hazBygeukz65JrI1Q6k8KJlTcdXYJTepKopaW2YNVhr/0JS72A4IfR5MVaeeMWh9OdY2QDZgPyQ5jhb72qBSAfrAL2aSJ8agFghC7rOu+962ujkK5uJ3Ff5s8iUWDfNS27OXrB/o9/h3GHwptODvVifN06q0kEE2peIS3B7qJ3qeamx36u9bcdkCl8nVqeA5UTEVmV/v58vopuScXCYElFHACUPlsh+AqaM75+6snflKM86OI1T98GU/bJoNMOsylWnewWF6uvxI1Yi9d5JPYp3TlC+RTRFWde8iPsdEVZobqbMGPr X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PSAPR06MB3942.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(136003)(396003)(376002)(346002)(39830400003)(230922051799003)(64100799003)(451199024)(186009)(1800799009)(4744005)(2906002)(4326008)(8936002)(5660300002)(8676002)(86362001)(36756003)(316002)(41300700001)(6636002)(66946007)(66556008)(66476007)(110136005)(9686003)(6486002)(6512007)(478600001)(6666004)(2616005)(38100700002)(38350700002)(1076003)(26005)(107886003)(6506007)(52116002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: lz52qsTsfDnT+oDL5tNkzHO6TNGgd5zo3lf65HtjKaXszY/aT2chSCGeYqW9vKPc0Py45xZLkFHKX88PxK8ORN1QTacPj56m3DIoInl5zR8JzueNlM/IG7qQQ9kcs6sVx6cb+ljguIWvJXZkcZnWKZ7jKc0101Yx9xm6/HgJ3U/C36D50ypPNIhodM4r693EeUyNnVWIo1OtxJj48qHXD+xFBz9wra7mLxTSRhrhYxi6r2n07W/ngbD/6BF88ZjgfnYWhZsou4RsWFZBJWCLfyYImZCdmsyHbY8zlxokF9tiBxa5yQaciOg4UgbiBEjoEUZJnoBO2dI8tqxHINDKe/h7t2eTab6Hn8bdWVvUKYHTcLp9eFrCP/9hRU4FA/2LFPE2U3l2qK5Rq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qzwHJ/MCHIyR1bpr5li1F3kC+9sz9xTPT3xH0tyapYoScBkCNJ/5R5uINk7lMAWUnD9Io9Qw6eM1HFj3WXx37Kr22uBf1FSJ69Trax84F7y65RMZUzyJRYJ1gEKPU/T4DbePrWlpRTUkdg== X-OriginatorOrg: jaguarmicro.com X-MS-Exchange-CrossTenant-Network-Message-Id: 85edcbce-23c0-40b7-c2f1-08dbc70282c7 X-MS-Exchange-CrossTenant-AuthSource: PSAPR06MB3942.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2023 06:56:20.4176 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 1e45a5c2-d3e1-46b3-a0e6-c5ebf6d8ba7b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Z2bXt3TNLi8M3IjzI3BUfgqKZ79xsbFwgbHX91e18OwDP1eI55mqr0ZRubxg+TqXlWON7iWpyTax3OoyWXNOhvkwEhh6ELJ9ePDBvDaESpc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB6745 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net From: Liming Wu Need to insmod vhost_test.ko before run virtio_test. Give some hints to users. Signed-off-by: Liming Wu --- tools/virtio/virtio_test.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c index 028f54e6854a..13572a677c35 100644 --- a/tools/virtio/virtio_test.c +++ b/tools/virtio/virtio_test.c @@ -135,6 +135,10 @@ static void vdev_info_init(struct vdev_info* dev, unsigned long long features) dev->buf = malloc(dev->buf_size); assert(dev->buf); dev->control = open("/dev/vhost-test", O_RDWR); + + if (dev->control < 0) + fprintf(stderr, + "Install vhost_test module (/vhost_test/vhost_test.ko) first.\n"); assert(dev->control >= 0); r = ioctl(dev->control, VHOST_SET_OWNER, NULL); assert(r >= 0);