Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp818118rdb; Fri, 6 Oct 2023 23:56:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHiOR0xPsQw+S81Dyl30XtUunI8DHXoGeC47Z8gL+KedBfnRXaicp/rATM7WeckdhErHmyy X-Received: by 2002:a17:902:e80f:b0:1c4:152a:496c with SMTP id u15-20020a170902e80f00b001c4152a496cmr11379986plg.19.1696661807948; Fri, 06 Oct 2023 23:56:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1696661807; cv=pass; d=google.com; s=arc-20160816; b=puU6usiFlleTE9pI8cAHmnzeK8ZLDAsma/JMZHxa7+vCGLnhV3t450siYJHVjDEQpl nlfAZRyRCwD1EHqNM7zqBl4mtWZm8ncTms0TaeCzb9VXaWObuhyYD97b9KBA/vwgMCzC s4s9rNBFs1zcnhFRVirbC9bw4E5TXqsQyzarHZ03m3LIt+Uc9ELgH07G63mxdQU5Codu SIJp+rsM4b0uIGHcsi8sHlQ5qS0pghoPq8GhpeveWkndapeGGRoLrlsHf3bOYoC1HOlJ o6cd3P5QAZ6xHCCEauzflWIW4w9zjzDtmQzwUNss99EAp6D4GlQ6KRZFHacBD9q+3N98 27OA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=XEg3U4C1ZpQnUuz6N6p7iOywx8McgaA7IUuwdRf5TLw=; fh=t5wS6LIn7PN23P9QjgHk61MahuHsm8cqRvwc1Ik5Vn0=; b=q2TlDXvBeZwH+N2NKBLBIWRXmyiJzDBoIJbzx1+4KXj1zW21YtklFyDUHwWM64X6/j JW+iNLtgFnhTkSWDnioC2/uFXje0lIkOalu0Jc1/0nDd1lahvcYdLOaoz6xZ1V98twYL KBQXgo1FchGGF0LKw1UsviTxncCpJO2Rtzp+9WUWG7rMoVtZUsldi5i+5i1avvRbyD0C 8bhiIxtaYfQKqxwVTLuHEoHCgDzwS4ZE29iOGTOfseFrXV7vl/O/VFId4mUxs1ojYBy9 J1mLe+5xsKSyxkYU7vpcZhhwWZfvYgCbiY6D2NhD1zBace623F0iyG6lk+B6jR1X7RyR GwlQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@jaguarmicro.com header.s=selector2 header.b=npBMmhya; arc=pass (i=1 spf=pass spfdomain=jaguarmicro.com dkim=pass dkdomain=jaguarmicro.com dmarc=pass fromdomain=jaguarmicro.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=jaguarmicro.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id kk4-20020a170903070400b001bbd70bdffbsi5012239plb.440.2023.10.06.23.56.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 23:56:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@jaguarmicro.com header.s=selector2 header.b=npBMmhya; arc=pass (i=1 spf=pass spfdomain=jaguarmicro.com dkim=pass dkdomain=jaguarmicro.com dmarc=pass fromdomain=jaguarmicro.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=jaguarmicro.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 08D808965223; Fri, 6 Oct 2023 23:56:45 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343636AbjJGG41 (ORCPT + 99 others); Sat, 7 Oct 2023 02:56:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343578AbjJGG4Z (ORCPT ); Sat, 7 Oct 2023 02:56:25 -0400 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> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2PR02CA0050.apcprd02.prod.outlook.com (2603:1096:4:196::11) To PSAPR06MB3942.apcprd06.prod.outlook.com (2603:1096:301:2b::5) 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: =?us-ascii?Q?lz52qsTsfDnT+oDL5tNkzHO6TNGgd5zo3lf65HtjKaXszY/aT2chSCGeYqW9?= =?us-ascii?Q?vKPc0Py45xZLkFHKX88PxK8ORN1QTacPj56m3DIoInl5zR8JzueNlM/IG7qQ?= =?us-ascii?Q?Q9kcs6sVx6cb+ljguIWvJXZkcZnWKZ7jKc0101Yx9xm6/HgJ3U/C36D50ypP?= =?us-ascii?Q?NIhodM4r693EeUyNnVWIo1OtxJj48qHXD+xFBz9wra7mLxTSRhr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suFOvME23pt0RUGSsmPSII+bp5gFX5l7gyZtgSTVTito?= =?us-ascii?Q?h3tkirDhlNwOWDAgPqnmQgQtBxbMgAX2T5eK11cF3m+P84Cl99s7cEzeOyFA?= =?us-ascii?Q?8nHwASqvdYnHu/lRC9grlx5dsoHdR/W23rsyoJzM+9TqolLBPkm1UcrbN3n+?= =?us-ascii?Q?SP+pBvG4cYsv6vX2ZKELu1rIY85+cvUoOYgVhUsZPmJv7C4OpN0O0NjcUd4Z?= =?us-ascii?Q?9dv2V8QGC/NOrjV5xuom32Aua4/f+AMyXGoNpowSHBmah/0xqLiReFbZJYC7?= =?us-ascii?Q?+Y8mryNbgDzh4yrM/wFh96bodCEgv+fXsWeEApjhHwouqyxssufjjDTew8Gc?= =?us-ascii?Q?lfoCPqpe6lAkUKZocGgmjTn0OLc2yQZuyBUQEex6qzwHJ/MCHIyR1bpr5li1?= =?us-ascii?Q?F3kC+9sz9xTPT3xH0tyapYoScBkCNJ/5R5uINk7lMAWUnD9Io9Qw6eM1HFj3?= =?us-ascii?Q?WXx37Kr22uBf1FSJ69Trax84F7y65RMZUzyJRYJ1gEKPU/T4DbePrWlpRTUk?= =?us-ascii?Q?dg=3D=3D?= 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.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Fri, 06 Oct 2023 23:56:45 -0700 (PDT) X-Spam-Level: ** 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); -- 2.34.1