Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp5298474rwj; Wed, 21 Dec 2022 00:16:26 -0800 (PST) X-Google-Smtp-Source: AMrXdXv7oQ17+iJNNDRcN+YfcuSRfVxM7zIg2BO9FoGyk8kOFD2/8Z9Dj33fZU84e6X6wquv/3t4 X-Received: by 2002:aa7:dd13:0:b0:467:6e86:e963 with SMTP id i19-20020aa7dd13000000b004676e86e963mr753473edv.38.1671610586734; Wed, 21 Dec 2022 00:16:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671610586; cv=none; d=google.com; s=arc-20160816; b=f+wZhIN477qMiauw+HUf+2BC0JFBTxl88+F2lmVeVTJ+IE6ZkmY7XjJkiGChExfVao mta6VUlo1S1nSvbpxbRyRgG6SSLzPyCa6a/Bt/A/K3e7uD5DIRVJ5f+Erj0cunANiUUN HlH4VNNj40C6IAVoEUsWwmhnB3Mo7nlO+b6r3wnI6s9AKifj5sCbKqSoMqt8tRu3iX+H l7pkS4SLbTgaM9ROkgoQPhuA0JZTfPtIt4x4WhOJjHrGo6kMNDORMqM8LKrlgIkQ8Gik VI0I+foWt6J5Av+wmiBjKYt4k56QP0ioXfBUS8ejid4aqpo1OmtkhAhQVCmEDPG24Fa9 fLdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=p56YFYadKwiAgc0MnsqbNwUdZHZ1PCgYXvpEaau8qXI=; b=N/EBU5mIxNlN9nD8+2YoCzfuDJNthEUSTmwEia6HtiaJvA/CBlnxfHc/Z5TEcTGHbD Oq/3+m3+nbyt90TKFsjpWoz6Noafp85fxkHxVGY8WfYBuwdXwN1PpLhLw/vyN/qjcO7X 7t9Nljlea/8qs2Eh1LkW/pspKvj9Idbfnndt7qeMzxy8LbnGSGl6KNuXgn+J1+up40Yt IpMc9k+7iP+oRO7DoiGUWkjMTHWU9sGB9Ws3oOxWMfhNY8SbGHenl0RKm30hCivV6CRh 2epEY56wyTolG63BTsj7zqFVOdnXM/URms9/dTMF4VEVGy1wp8TOOA/hQOTs9R3mFxrz l9Jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@igel-co-jp.20210112.gappssmtp.com header.s=20210112 header.b=smEr4XpR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i36-20020a0564020f2400b00461e322ec5dsi12978076eda.294.2022.12.21.00.16.02; Wed, 21 Dec 2022 00:16:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@igel-co-jp.20210112.gappssmtp.com header.s=20210112 header.b=smEr4XpR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234440AbiLUHze (ORCPT + 69 others); Wed, 21 Dec 2022 02:55:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233195AbiLUHzV (ORCPT ); Wed, 21 Dec 2022 02:55:21 -0500 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77E9C21805 for ; Tue, 20 Dec 2022 23:55:12 -0800 (PST) Received: by mail-pl1-x634.google.com with SMTP id d15so14767499pls.6 for ; Tue, 20 Dec 2022 23:55:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=igel-co-jp.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=p56YFYadKwiAgc0MnsqbNwUdZHZ1PCgYXvpEaau8qXI=; b=smEr4XpRA9enckwDuKr/UQkAYxUCFQt7+Rn6jW3q7sqnpU9OZGETueVipO8M9Jnuyl 4CjOpen7LdavGhYBUgH6MzvV2BM9duC9oC49RWeYeOL0IBUKFzzGefRtNTcdxFSJkdxa wIaTILxbOLa4sqcMpJR6wq1A2gZve8FNp6lwRJPFlCKUhmVrpvT4GBljDpG26TGAqfzU MdQe71g/NSUo80iEiQ996CPCw4Av3nLYhDi3+0JQHjbZBt9/CoJ6ntoxPbz59wnYCXKX jFs7UOeLerDI1aWlMQBcdgD2dq2RqIp+sdowTjxp186GZdCe0qxQGKPbXcE9kGJAWq+T lTxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=p56YFYadKwiAgc0MnsqbNwUdZHZ1PCgYXvpEaau8qXI=; b=wf4oa9miKGpleQURsweprpWtVntg6Cl68+PQlqNzd1WL4i8WE5k/b9Ki/WQGFNADy+ sr0nrY6lJ0pXY5i5qRilnkRdPR17uAfIxF4iB/jcRJ/jf10yTGdCzoZavZoLfKL55ghu LUR+5XOwEZWoivhGqw1Vh7R44gE5Qpzb2Mgi3FUXBusuqVKWZLvBoGbwGVatbggGvK4g uAMwfX5dTfk4D0EayPabrxKz7b0BLuCww1JMTEKLcMLv4okZSLU0U6Np8uIRZKAsK+pZ LUxg/3cG23q3wchqp7Tyrie2jy2C+e6yF+nCTjzE/HheyVE8kOeLmF7LS4YAWJlJAfRn hrEg== X-Gm-Message-State: AFqh2kqwMGvSiLQaVPA8OzkTHDrkvv0WX96mrAI+ValZz4rT/yuaupyc zsiC0+Lr51/BwNwJYlBDdxB/7O0bbvozYJnHh6w= X-Received: by 2002:a17:90a:7d0f:b0:219:7f29:3152 with SMTP id g15-20020a17090a7d0f00b002197f293152mr1098129pjl.39.1671609311796; Tue, 20 Dec 2022 23:55:11 -0800 (PST) Received: from tyrell.hq.igel.co.jp (napt.igel.co.jp. [219.106.231.132]) by smtp.gmail.com with ESMTPSA id ne1-20020a17090b374100b0020c899b11f1sm771779pjb.23.2022.12.20.23.55.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Dec 2022 23:55:11 -0800 (PST) From: Shunsuke Mie To: "Michael S. Tsirkin" Cc: Jason Wang , Shunsuke Mie , =?UTF-8?q?Eugenio=20P=C3=A9rez?= , Stefano Garzarella , linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org Subject: [PATCH] tools/virtio: fix the vringh test for virtio ring changes Date: Wed, 21 Dec 2022 16:55:06 +0900 Message-Id: <20221221075506.3291148-1-mie@igel.co.jp> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the build caused by missing kmsan_handle_dma() and is_power_of_2() that are used in drivers/virtio/virtio_ring.c. Signed-off-by: Shunsuke Mie --- tools/virtio/linux/cpumask.h | 7 +++++++ tools/virtio/linux/gfp.h | 7 +++++++ tools/virtio/linux/kernel.h | 1 + tools/virtio/linux/kmsan.h | 12 ++++++++++++ tools/virtio/linux/log2.h | 11 +++++++++++ tools/virtio/linux/topology.h | 7 +++++++ 6 files changed, 45 insertions(+) create mode 100644 tools/virtio/linux/cpumask.h create mode 100644 tools/virtio/linux/gfp.h create mode 100644 tools/virtio/linux/kmsan.h create mode 100644 tools/virtio/linux/log2.h create mode 100644 tools/virtio/linux/topology.h diff --git a/tools/virtio/linux/cpumask.h b/tools/virtio/linux/cpumask.h new file mode 100644 index 000000000000..307da69d6b26 --- /dev/null +++ b/tools/virtio/linux/cpumask.h @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_CPUMASK_H +#define _LINUX_CPUMASK_H + +#include + +#endif /* _LINUX_CPUMASK_H */ diff --git a/tools/virtio/linux/gfp.h b/tools/virtio/linux/gfp.h new file mode 100644 index 000000000000..43d146f236f1 --- /dev/null +++ b/tools/virtio/linux/gfp.h @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __LINUX_GFP_H +#define __LINUX_GFP_H + +#include + +#endif diff --git a/tools/virtio/linux/kernel.h b/tools/virtio/linux/kernel.h index 21593bf97755..8b877167933d 100644 --- a/tools/virtio/linux/kernel.h +++ b/tools/virtio/linux/kernel.h @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/tools/virtio/linux/kmsan.h b/tools/virtio/linux/kmsan.h new file mode 100644 index 000000000000..272b5aa285d5 --- /dev/null +++ b/tools/virtio/linux/kmsan.h @@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_KMSAN_H +#define _LINUX_KMSAN_H + +#include + +inline void kmsan_handle_dma(struct page *page, size_t offset, size_t size, + enum dma_data_direction dir) +{ +} + +#endif /* _LINUX_KMSAN_H */ diff --git a/tools/virtio/linux/log2.h b/tools/virtio/linux/log2.h new file mode 100644 index 000000000000..aa67bb21d8e2 --- /dev/null +++ b/tools/virtio/linux/log2.h @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#ifndef _LINUX_LOG2_H +#define _LINUX_LOG2_H + +inline bool is_power_of_2(unsigned long n) +{ + return true; +} + +#endif /* _LINUX_LOG2_H */ diff --git a/tools/virtio/linux/topology.h b/tools/virtio/linux/topology.h new file mode 100644 index 000000000000..910794afb993 --- /dev/null +++ b/tools/virtio/linux/topology.h @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_TOPOLOGY_H +#define _LINUX_TOPOLOGY_H + +#include + +#endif /* _LINUX_TOPOLOGY_H */ -- 2.25.1