From patchwork Sun Oct 8 03:17:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liming Wu X-Patchwork-Id: 13412535 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 3EF30188 for ; Sun, 8 Oct 2023 03:18:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=jaguarmicro.com header.i=@jaguarmicro.com header.b="JuT9CDWY" Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2079.outbound.protection.outlook.com [40.107.215.79]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3EA27BF; Sat, 7 Oct 2023 20:17:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OLbsNRIMq26TQYoedyoYH83d/Jl3qMB1lsgtD1qJYjxRbgn1MLAMCoNFAkIgHCfwTL2ig8wQTSRm81QhCu67PhvXkPDXr0+2nYua9hz8gf8WYHReYjLS7zsb9c/UoOIaqUXhdWescIGDpSe5BD2Z9PL2KAVm3Dt+Je/0tNGpLJhyC2qK70ItmHG/O0KH82m9kPEuBYRgSyY8mmHlCF/kcKylRxTlT8e9d2znJho2WEAeS9p0Iwibf0z3Zdd4r4klltifK+gCAonBGDxWmXVPxt7BPUiAaVUPCgNMFms2VWJ6U6DPXVj0xBjArpAqFbGve5C1OmfyoQ9bW+I/g2ZK5g== 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=im2EoKIQ8KYAGJvuRKhFnpahAsqN5d/2t0mpgyl9dLZjk3NMuJN+3/liE6K32T9t1CkImW1ejqpzuNr2VdV2ICSrIFrHVXpdoLvLX1b+M/H+LA1hVHhCSgsEWcd55a+Rg0y+GwkfrHYvYIgKuDI4x6dshVnBGMdu4Sv3yYWTtuLgmIQdDFIViYCDOa9nq2QLuykIJnWgIJx5HxNE8NOuoJ5TvZxS6fztSD6EUvQqY/eyL97+Oj/4f13W14Ih5IS4D6ZL8UzXDJaWOBAXofwNusM1lDsQQsKawKLuXq7XurwpXppqJMckmonVIdb+ILMf8qgN787iTSdICjpNB1T/Kw== 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=JuT9CDWYYRv+I/4PyMezFl+iR3tTpD/dEbqRaC1UnqweBhyXJQUQir5cDzm2F/4ttlo+U+awTCG+dlCVzoSf/IrsQtO6nxLqgb3NuBdOXc9B/0mEFXWwt3gPEb4zHA+p9il6OVA5Lz70bS/DPiS853pFEW0/1mdCpiwoaonjBQxMKfDRs2GmD3AcT3rNT9pC6TmxQTruxwnV0VR6dsdJpTpZWG+jnteQ595IbzcCZQoHYRoUtzjFVKxjM1oosQbyPCiCRZ5R4J5r+9Z3+PbSpp8ZaLyW5iiiWXAiLlLTdA94Ola48/pGg6TU879jP3jAn26qt3x4+ZO4Ielm/Jp/1Q== 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 TYZPR06MB6514.apcprd06.prod.outlook.com (2603:1096:400:454::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.41; Sun, 8 Oct 2023 03:17:54 +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.6863.032; Sun, 8 Oct 2023 03:17:54 +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: Sun, 8 Oct 2023 11:17:33 +0800 Message-Id: <20231008031734.1095-1-liming.wu@jaguarmicro.com> X-Mailer: git-send-email 2.34.0.windows.1 X-ClientProxiedBy: TYAPR01CA0053.jpnprd01.prod.outlook.com (2603:1096:404:2b::17) 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_|TYZPR06MB6514:EE_ X-MS-Office365-Filtering-Correlation-Id: 6b7873b4-fe76-4f89-619c-08dbc7ad2942 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BZpiVRySAxrpOELbK2TL6Q2neFcAWJTPTp32LrLD6qns+LN1XrrpQxSlmg9LR//p1GLVXbpkTIpm9TDbR+tjsJEIb77P7AYMJ4xVsr7Guw+GMCfDXH9zPKgG65DkGw8WHAHmkhJwOKP4DkL9WBFgt14TO5/abFLUkB1qga9xSSf8rwodjDNnzG4nlGtxu7xEX78ddccjpm/JE5kGuQr8IKnPxg5eHSVSfEY7ZhcLTcKpfMnYnzRczPSuRlmXTu4O+1SBWSWPPj9J67k6kH8VV+lpd0Py04HSqwM32+23TGt8EyUAAHuUXOPVxmv7YrLQGLklok2HM6dWyf9zhLfU+Z/ixGQSePO6ag2wxxpetre3+VTpCd77oq1ySRu8pZNAv8uNNxvYUScb0W7XKiGrz1OedluAArG+KeJ3ktziz96cRjzY+uvHnSVWpdyKqYz+xLPzre5V+3BA3u//N3O9vzIEe/C3WMHcRe3ITy2LSvGLIVekTI6MSvhFDl3aO9LVUE9GskuhLFSIhmUNL3JW0sWG7KetjlJQeLzQcc216uExu+/HVDt8vJKAuw8OHYnL2L4LRYwNIeWs5sl9EtvACDBSVdNetD0oIaZSqLwM/VcoVc/WycpuUdqjHdv4pQn5 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)(376002)(366004)(136003)(39830400003)(396003)(346002)(230922051799003)(186009)(1800799009)(64100799003)(451199024)(478600001)(66946007)(110136005)(66476007)(66556008)(6636002)(6486002)(316002)(38350700002)(6506007)(2616005)(6666004)(38100700002)(9686003)(26005)(1076003)(107886003)(52116002)(6512007)(36756003)(41300700001)(4326008)(5660300002)(8936002)(8676002)(2906002)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: LOEOmlp1k57CfPJsvCNqUG9tXTKcuKiMdzS5yViuSpv34TAuxrhA1SGBdiFmb6eh66qr86kBo9CGL1Us1RUF4u2KgJYHeYi6n7B3C2Zh7rjcI5/QoZhQo6XpVQ6PgmxHTgAnaWprotU1hwb/glOCfqwiGfXcm2n01NrmQatx9FL14OGTvf9N9Rt7qcJB6axrHk84Ump/nd5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BKk/2VzBdqvRDbMeOYKe8TY3BESrZ/0ZnaGTR365cd4QvAo7BhW6KTJ++hed/AmFTuz17pb0LoAJT/cuyoFmn4nccvGgyBeZnuJCPjFeaJlh4k/lcS/ExLzpOoWb7kFihzcV6ddtbRvSyXHwjTrX6MjkbpLfsBTT1ZXsc+uUjLAs9FklnOxTL9FpWeie3IkfVTLZhXDC7NCJWU+vbZ/UER9pgn3ZF1Nf+XLJvt9Ib6pBy/KYsw/yctn54JHv7hiwLgNf/OsWqqFw0o1JfI2wRZotRZXF/pl99QSHunC0GsCq7+8n/A6zd7DKwjU7e79eeLQoA== X-OriginatorOrg: jaguarmicro.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6b7873b4-fe76-4f89-619c-08dbc7ad2942 X-MS-Exchange-CrossTenant-AuthSource: PSAPR06MB3942.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Oct 2023 03:17:54.0880 (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: SDvbADrDZ0nQhg2JBWOnNsJpHOJSfLvEXzteuTn6xM4sABD87aENqfRI55a1o4FFWq8Rttb//xd1l+dBDX/hEzkD2dulvVsstPCPyJJEuXA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB6514 X-Spam-Status: No, score=-2.5 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 Sun Oct 8 03:17:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liming Wu X-Patchwork-Id: 13412536 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 DD85C15CC for ; Sun, 8 Oct 2023 03:18:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=jaguarmicro.com header.i=@jaguarmicro.com header.b="Fq5+ePF1" Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2079.outbound.protection.outlook.com [40.107.215.79]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6DC8BD; Sat, 7 Oct 2023 20:18:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PVpewel+Melowzbc9FqRJA/2pRtHImlUTVdT1eqjndIANc5nIXQ+Y0R5iEeANHRnOW5Vk1ciNcM3cls9T4I74hg+Dke0lIOGR0iTJR855ml+Dv8bPQCD/dVLDSwL8EcfIVQXhFfo3gTwgknkydvqTnnQKrCzHnQxsJGv0/cdbhq07CoztNons7nhDHnlJB5IAbcRKC+1PJlYn0SemckR2GFy+AnJ8rLRVPoxybHdBwg8eFoF+0AYSjuO/ZMhaYCdlnDfb+PGzSBrd85ByToBLW6r5SEHr4PRWh0hiDYds8hsS+dwkX2PW6AJwZTVb1zYxQjX2J9P/XbEa7EVkxmlSQ== 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=ZiSSt9+07jFyZ9CDYPxWwuiq4IslOeTq7xqk3JqSFgc=; b=Kr/MQ37HRAaK63uVHbKQcZ8oSArDZA89I9sT4nbiKbj83ATY9WGRcyaoYW6kyi+Q4ZIeFKIzEfUfKTi9NMNl0yORKToHA6mXgZT2ETikTaifbx4Q+rXcRFeRZFykVwHe9GX+qBZ7iZgsXfgQlL0kpUENhta7A5gGJfDWUxz4ft9x05ku7fz1iGdAorqhsTkwgi5rhTOuQS22VeA3Khkx3J+fEg+HblQtbWwagCeCV/3XNQgQhrQJec653EPkmAoP9FeRoBkbX8JrnMz1kTZ5912DjPY7Gyb7gRQ+QXVKT6iyoQhEcyCaGVGDzMltW1UJYKryRMP7thFlA/Ha2RutdQ== 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=ZiSSt9+07jFyZ9CDYPxWwuiq4IslOeTq7xqk3JqSFgc=; b=Fq5+ePF11Qe8BARKKqrSD2m9A7VijRIKwcvaJ7SzFV2mpBe7s01hP+xCHoWrayar9smXjSJThMu4UBTkK4lSsT9ghc/gAJdaJyw/Cd0BuJyXGeivRpw8Prs4K5+NA1kPzgzBB6GcfvO6gmBkHbncJLrc3ctwRe8UXp+8VZQE+v+RV10NxrKPCpVocRxxWrbqzcv/UEeKEr4CN8fi8abZzQwWDRsMdbLYvfzd+mT9LWOxt8qa4CmX9FvXYA0FZyYVqhJkYx8EaPD83Uaae7GU8Av42WVF7QppKQM33YtoTPFLwqc8F3BlfDeftV1YmHlj0tfl3EgIGfAwx0F9Rp3rnA== 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 TYZPR06MB6514.apcprd06.prod.outlook.com (2603:1096:400:454::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.41; Sun, 8 Oct 2023 03:17:58 +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.6863.032; Sun, 8 Oct 2023 03:17:57 +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: Sun, 8 Oct 2023 11:17:34 +0800 Message-Id: <20231008031734.1095-2-liming.wu@jaguarmicro.com> X-Mailer: git-send-email 2.34.0.windows.1 In-Reply-To: <20231008031734.1095-1-liming.wu@jaguarmicro.com> References: <20231008031734.1095-1-liming.wu@jaguarmicro.com> X-ClientProxiedBy: TYAPR01CA0053.jpnprd01.prod.outlook.com (2603:1096:404:2b::17) 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_|TYZPR06MB6514:EE_ X-MS-Office365-Filtering-Correlation-Id: dce9fbd7-6aa6-4c2c-002e-08dbc7ad2b8d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: G+vkVSdZM5DWdjpVXkOc4osz8FQ8e1liVn2vbiVoU5IEca0QfgfNd69ecB/1SijXb3jS4UNMIC4E45NJo3ohoWciVM9naab6lqQ56U1LmIh2+SJLnHoD9p6mrGA/ZLWWnG8SRwj/B45PALzyIfJwqDJNjrq7UhJqOFQFVRmF3pigcBwOmqpIUmEqr0H0O996BWzqK0XRbuRfB+7nv5HBH4lh2cxjgCtG7FPMJQ+aJGjMb4TUPQTjxrAERC7R4X95jQnVozsnhsaRq2NMhrTBuqvoY8Yvri+IWdYhREQD7By4Y05jCBhONiFKXsKB0BIPjBI9j7yWY9PVpLA+FlHB9hTWMCsSAB5imnYky7KblvcbsWZ69IXd0LQZQ9Em+IoiklKm+aYE7XS6w+PjtEMyThTG7rwSAkE2Mq2HX3wSHgSuhJNH6YQ9xFAdC0qmMaJOKdO8dFpAjqPa1lyKcuRBLGZ2L09mUZhOHfT+P6W7xd6NTT8r8d6it84FHZB5X9m26j5GjTtUizYYGyGWev0WqTlmLk73TKT2+aTJH1CudFNnBiIbaEBb/IZhkbgp1FjbMochvC7W07prB3lVfDoQvLNKU+MDaT6RDvdJvIdvaDtpeMP08WNCVi2xWJ9VO9lW 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)(376002)(366004)(136003)(39830400003)(396003)(346002)(230922051799003)(186009)(1800799009)(64100799003)(451199024)(478600001)(66946007)(110136005)(66476007)(66556008)(6636002)(6486002)(316002)(38350700002)(6506007)(2616005)(6666004)(38100700002)(9686003)(26005)(1076003)(107886003)(52116002)(6512007)(36756003)(4744005)(41300700001)(4326008)(5660300002)(8936002)(8676002)(2906002)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 2gpkaHVcgywtV3jSBM59JL2PfJOvGtZ3Wp7n5Fd24duGImb+h08NCd426uiQ6cjFXNg0PGuiMS2jPeoxSAlKSQmrxWx8TzIR39IoTosuiLRMk2jbpUtKwbMeu8OISQcl3bB7FMSgt4QaVdktyjbMiieeu8ePRemKJZfSLqzHTFKtj8eRW3STJs8whE9Wq6NCVFIk58esC6MLFVzyWpYHa9C33L0QnoIjjUbIpBMAdKbM0bhv1gqTMkKxu+ohCCpALkJs69sEM/8Hiyh/X9RBMB9r8CFYxEHw6ZtkWV3Bc+ixMqnmTfUoKJpmcmH4gOUWYLuRJ3kR9VnjD+vncNAmVYJQHg2Kxxw9BboaCRstlZyYgac8y+WhOwRfI8d/2i66ibvVKf4bZ+loGBykUWrXi/VtQK3NcIAv5aa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nJa0V7QDe21aUsCjdDIZ55vul0HJLDICrIO0hhOVSmQEZ3IH6H2KZBikVk/YrZiuK4X6n9lfco7HZTi7A3KxdmSJNod5HoSBxfYWg6/1EgGORAboh/fjyV45VBxRwg== X-OriginatorOrg: jaguarmicro.com X-MS-Exchange-CrossTenant-Network-Message-Id: dce9fbd7-6aa6-4c2c-002e-08dbc7ad2b8d X-MS-Exchange-CrossTenant-AuthSource: PSAPR06MB3942.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Oct 2023 03:17:57.8991 (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: YcZtrsyQtF/FHWuSTYlz3X8FgcWLgEBmpgQkc5plNGoMGh6HWvZgMo/MpwyhrwfS9FYr7Cr9qOlPuOLe2h5R3qUjNR5zGNb03jLgHhImX0M= X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB6514 X-Spam-Status: No, score=-2.5 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);