From nobody Sun May 5 06:59:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1557731639; cv=none; d=zoho.com; s=zohoarc; b=CMlj9y/eE4QrPTx/Gs+vbYsiPPrP6CGEfUMk/iQy6iwjuE/bn7IYzTuH7CjN5euRTkPH544jBgUN+WFpHPFFvSnfeLuMM1ALfBpOiQmoo1gBvNTYEzwb5OR9hIBCIoSkPcDkpNWVW7G5iliORWniD4duip4nfI52QIV0TU77iAE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557731639; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=52P/wDQZRtkXTJzPhfHEAhuwOO2EXJWZ3WCHYndprnc=; b=aGDF+m/uUaOLCk/R2FHRXd0T4qCoTHIq6+w7nziTV3tKyCkdHqorVlTopo2xtc4NBpeVpAlnxTsTmHZO8se5981iKeWSj4xLqVCKEU6IDc8H+PNxzxfwuqDdLrr2EMyhIhKzcTA1DJEPe5KSyIAal/wLA7oiZZ8hn1fcQQkzBzw= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1557731639535343.8827825452199; Mon, 13 May 2019 00:13:59 -0700 (PDT) Received: from localhost ([127.0.0.1]:52290 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQ599-0006K0-UC for importer@patchew.org; Mon, 13 May 2019 03:13:15 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43030) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQ54E-0002RU-HN for qemu-devel@nongnu.org; Mon, 13 May 2019 03:08:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hQ4pv-0002KN-Af for qemu-devel@nongnu.org; Mon, 13 May 2019 02:53:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59868) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hQ4pv-0002I7-13 for qemu-devel@nongnu.org; Mon, 13 May 2019 02:53:23 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C5559307CDC7 for ; Mon, 13 May 2019 06:53:18 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-74.ams2.redhat.com [10.36.117.74]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2D0AE18A52; Mon, 13 May 2019 06:53:11 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 3BC98A1E4; Mon, 13 May 2019 08:53:10 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 13 May 2019 08:53:04 +0200 Message-Id: <20190513065310.10263-2-kraxel@redhat.com> In-Reply-To: <20190513065310.10263-1-kraxel@redhat.com> References: <20190513065310.10263-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Mon, 13 May 2019 06:53:18 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 1/7] libvhost-user: fix -Waddress-of-packed-member X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Gerd Hoffmann , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Marc-Andr=C3=A9 Lureau /home/elmarco/src/qemu/contrib/libvhost-user/libvhost-user.c: In function = =E2=80=98vu_set_mem_table_exec_postcopy=E2=80=99: /home/elmarco/src/qemu/contrib/libvhost-user/libvhost-user.c:546:31: warnin= g: taking address of packed member of =E2=80=98struct VhostUserMsg=E2=80=99= may result in an unaligned pointer value [-Waddress-of-packed-member] 546 | VhostUserMemory *memory =3D &vmsg->payload.memory; | ^~~~~~~~~~~~~~~~~~~~~ /home/elmarco/src/qemu/contrib/libvhost-user/libvhost-user.c: In function = =E2=80=98vu_set_mem_table_exec=E2=80=99: /home/elmarco/src/qemu/contrib/libvhost-user/libvhost-user.c:688:31: warnin= g: taking address of packed member of =E2=80=98struct VhostUserMsg=E2=80=99= may result in an unaligned pointer value [-Waddress-of-packed-member] 688 | VhostUserMemory *memory =3D &vmsg->payload.memory; | ^~~~~~~~~~~~~~~~~~~~~ /home/elmarco/src/qemu/contrib/libvhost-user/libvhost-user.c: In function = =E2=80=98vu_set_vring_addr_exec=E2=80=99: /home/elmarco/src/qemu/contrib/libvhost-user/libvhost-user.c:817:36: warnin= g: taking address of packed member of =E2=80=98struct VhostUserMsg=E2=80=99= may result in an unaligned pointer value [-Waddress-of-packed-member] 817 | struct vhost_vring_addr *vra =3D &vmsg->payload.addr; | ^~~~~~~~~~~~~~~~~~~ Signed-off-by: Marc-Andr=C3=A9 Lureau Message-id: 20190503130034.24916-2-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann --- contrib/libvhost-user/libvhost-user.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/libvhost-user/libvhost-user.c b/contrib/libvhost-user/= libvhost-user.c index e08d6c7b9741..dcf4a969f238 100644 --- a/contrib/libvhost-user/libvhost-user.c +++ b/contrib/libvhost-user/libvhost-user.c @@ -542,7 +542,7 @@ static bool vu_set_mem_table_exec_postcopy(VuDev *dev, VhostUserMsg *vmsg) { int i; - VhostUserMemory *memory =3D &vmsg->payload.memory; + VhostUserMemory m =3D vmsg->payload.memory, *memory =3D &m; dev->nregions =3D memory->nregions; =20 DPRINT("Nregions: %d\n", memory->nregions); @@ -684,7 +684,7 @@ static bool vu_set_mem_table_exec(VuDev *dev, VhostUserMsg *vmsg) { int i; - VhostUserMemory *memory =3D &vmsg->payload.memory; + VhostUserMemory m =3D vmsg->payload.memory, *memory =3D &m; =20 for (i =3D 0; i < dev->nregions; i++) { VuDevRegion *r =3D &dev->regions[i]; @@ -813,7 +813,7 @@ vu_set_vring_num_exec(VuDev *dev, VhostUserMsg *vmsg) static bool vu_set_vring_addr_exec(VuDev *dev, VhostUserMsg *vmsg) { - struct vhost_vring_addr *vra =3D &vmsg->payload.addr; + struct vhost_vring_addr addr =3D vmsg->payload.addr, *vra =3D &addr; unsigned int index =3D vra->index; VuVirtq *vq =3D &dev->vq[index]; =20 --=20 2.18.1 From nobody Sun May 5 06:59:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1557731609; cv=none; d=zoho.com; s=zohoarc; b=Tf7FYuk7jLcWR35K5zIiIWpSfw4AcprZTXAY1q8Dnj0mgI6vlvLxZrM1bvnQ2t4UeZ4eziB1aKaz+gp9xwgYZoNWZi1hRuxb7G40mIl6yS7NdtXV+6LW4DackQD8Mm0dX/Nn0NwDy456SdWqSF6Sb/7Lu7E2oCGdxwFqmLnXi1g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557731609; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=CrLLaBNXHrvFTuMjvP1N7coQ4Hzlt65k2jyjyy2z+mY=; b=kBSFKgoxKfTwKiE1aAgSLbK4diJcP9pNDOZ16MwbtdfRyPcnX17zVnzT8QRXX/kR6pZYWNob9qhZh9UyQfCkmFXZK6h6k8hadJnInXlT2crOfD5COv+QKV6TCI9u4mQ78e/pm9cz1014wW2CTZeLB2pgDnAWLHSjDEk/wRRsLDY= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1557731609035267.90630510466974; Mon, 13 May 2019 00:13:29 -0700 (PDT) Received: from localhost ([127.0.0.1]:52292 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQ59B-0006MQ-GS for importer@patchew.org; Mon, 13 May 2019 03:13:17 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42955) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQ54G-0002Mr-JU for qemu-devel@nongnu.org; Mon, 13 May 2019 03:08:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hQ4pt-0002Is-3Y for qemu-devel@nongnu.org; Mon, 13 May 2019 02:53:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51762) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hQ4ps-0002Hr-82 for qemu-devel@nongnu.org; Mon, 13 May 2019 02:53:21 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 11144C0528CB for ; Mon, 13 May 2019 06:53:18 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-74.ams2.redhat.com [10.36.117.74]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2BF0217AE4; Mon, 13 May 2019 06:53:11 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 43C82A1E8; Mon, 13 May 2019 08:53:10 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 13 May 2019 08:53:05 +0200 Message-Id: <20190513065310.10263-3-kraxel@redhat.com> In-Reply-To: <20190513065310.10263-1-kraxel@redhat.com> References: <20190513065310.10263-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 13 May 2019 06:53:18 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 2/7] libvhost-user: add PROTOCOL_F_CONFIG if {set, get}_config X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Gerd Hoffmann , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Marc-Andr=C3=A9 Lureau Add the config protocol feature bit if the set_config & get_config callbacks are implemented. Signed-off-by: Marc-Andr=C3=A9 Lureau Message-id: 20190503130034.24916-3-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann --- contrib/libvhost-user/libvhost-user.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contrib/libvhost-user/libvhost-user.c b/contrib/libvhost-user/= libvhost-user.c index dcf4a969f238..74d42177c5c8 100644 --- a/contrib/libvhost-user/libvhost-user.c +++ b/contrib/libvhost-user/libvhost-user.c @@ -1157,6 +1157,10 @@ vu_get_protocol_features_exec(VuDev *dev, VhostUserM= sg *vmsg) features |=3D 1ULL << VHOST_USER_PROTOCOL_F_PAGEFAULT; } =20 + if (dev->iface->get_config && dev->iface->set_config) { + features |=3D 1ULL << VHOST_USER_PROTOCOL_F_CONFIG; + } + if (dev->iface->get_protocol_features) { features |=3D dev->iface->get_protocol_features(dev); } --=20 2.18.1 From nobody Sun May 5 06:59:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1557731423; cv=none; d=zoho.com; s=zohoarc; b=JqsJFlXT2nOqlvyFJECqukZLfwLSkUl33hBTYxu354ncG+2Ued9I83Fkjuun0SWz1aPfQrIG/K8X/ssl+YSPgZuOrN17zDFUXPqFDeI/qFmdwZsG4WWaS3/WG13zF8TDWF2wwMlVKjWbd+lsKb5thphpR7l3WDMubgwyvlKVrNM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557731423; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=9l4mdvf6e6TCG0DnoHO2r0yc0lMAhK/i+BTybDHBpqU=; b=B8I0ntB4eVDmnXz2mW/rlxTvxhoU0R5kD/0S2xUBLKA0Olz9AgHCu+qFMy3vrLc7eKdflrKw8o2LrbwOpSfzS7SYy6K+LuE/SfYQMTH++TGUYg7VA8s9YGbxFOlETx49RjTG7VnbW9Zp4hXzBKYqJI5i66zhYj/zOPCjgzfXTN8= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1557731423517974.3561486332648; Mon, 13 May 2019 00:10:23 -0700 (PDT) Received: from localhost ([127.0.0.1]:52238 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQ56K-0003ht-Cq for importer@patchew.org; Mon, 13 May 2019 03:10:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43174) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQ54F-0002ST-7O for qemu-devel@nongnu.org; Mon, 13 May 2019 03:08:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hQ4pv-0002KB-8N for qemu-devel@nongnu.org; Mon, 13 May 2019 02:53:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40238) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hQ4pu-0002ID-Vh for qemu-devel@nongnu.org; Mon, 13 May 2019 02:53:23 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EC6DB3084248 for ; Mon, 13 May 2019 06:53:18 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-74.ams2.redhat.com [10.36.117.74]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2C0616B8C7; Mon, 13 May 2019 06:53:11 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 5062BA1E9; Mon, 13 May 2019 08:53:10 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 13 May 2019 08:53:06 +0200 Message-Id: <20190513065310.10263-4-kraxel@redhat.com> In-Reply-To: <20190513065310.10263-1-kraxel@redhat.com> References: <20190513065310.10263-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Mon, 13 May 2019 06:53:18 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 3/7] Add vhost-user-backend X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Gerd Hoffmann , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Marc-Andr=C3=A9 Lureau Create a vhost-user-backend object that holds a connection to a vhost-user backend (or "slave" process) and can be referenced from virtio devices that support it. See later patches for input & gpu usage. Note: a previous iteration of this object made it user-creatable, and allowed managed sub-process spawning, but that has been dropped for now. Signed-off-by: Marc-Andr=C3=A9 Lureau Message-id: 20190503130034.24916-4-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann --- include/sysemu/vhost-user-backend.h | 57 ++++++++ backends/vhost-user.c | 209 ++++++++++++++++++++++++++++ MAINTAINERS | 2 + backends/Makefile.objs | 2 + 4 files changed, 270 insertions(+) create mode 100644 include/sysemu/vhost-user-backend.h create mode 100644 backends/vhost-user.c diff --git a/include/sysemu/vhost-user-backend.h b/include/sysemu/vhost-use= r-backend.h new file mode 100644 index 000000000000..9abf8f06a1b9 --- /dev/null +++ b/include/sysemu/vhost-user-backend.h @@ -0,0 +1,57 @@ +/* + * QEMU vhost-user backend + * + * Copyright (C) 2018 Red Hat Inc + * + * Authors: + * Marc-Andr=C3=A9 Lureau + * + * This work is licensed under the terms of the GNU GPL, version 2 or late= r. + * See the COPYING file in the top-level directory. + */ +#ifndef QEMU_VHOST_USER_BACKEND_H +#define QEMU_VHOST_USER_BACKEND_H + +#include "qom/object.h" +#include "exec/memory.h" +#include "qemu/option.h" +#include "qemu/bitmap.h" +#include "hw/virtio/vhost.h" +#include "hw/virtio/vhost-user.h" +#include "chardev/char-fe.h" +#include "io/channel.h" + +#define TYPE_VHOST_USER_BACKEND "vhost-user-backend" +#define VHOST_USER_BACKEND(obj) \ + OBJECT_CHECK(VhostUserBackend, (obj), TYPE_VHOST_USER_BACKEND) +#define VHOST_USER_BACKEND_GET_CLASS(obj) \ + OBJECT_GET_CLASS(VhostUserBackendClass, (obj), TYPE_VHOST_USER_BACKEND) +#define VHOST_USER_BACKEND_CLASS(klass) \ + OBJECT_CLASS_CHECK(VhostUserBackendClass, (klass), TYPE_VHOST_USER_BAC= KEND) + +typedef struct VhostUserBackend VhostUserBackend; +typedef struct VhostUserBackendClass VhostUserBackendClass; + +struct VhostUserBackendClass { + ObjectClass parent_class; +}; + +struct VhostUserBackend { + /* private */ + Object parent; + + char *chr_name; + CharBackend chr; + VhostUserState vhost_user; + struct vhost_dev dev; + VirtIODevice *vdev; + bool started; + bool completed; +}; + +int vhost_user_backend_dev_init(VhostUserBackend *b, VirtIODevice *vdev, + unsigned nvqs, Error **errp); +void vhost_user_backend_start(VhostUserBackend *b); +void vhost_user_backend_stop(VhostUserBackend *b); + +#endif diff --git a/backends/vhost-user.c b/backends/vhost-user.c new file mode 100644 index 000000000000..2b055544a739 --- /dev/null +++ b/backends/vhost-user.c @@ -0,0 +1,209 @@ +/* + * QEMU vhost-user backend + * + * Copyright (C) 2018 Red Hat Inc + * + * Authors: + * Marc-Andr=C3=A9 Lureau + * + * This work is licensed under the terms of the GNU GPL, version 2 or late= r. + * See the COPYING file in the top-level directory. + */ + + +#include "qemu/osdep.h" +#include "hw/qdev.h" +#include "qapi/error.h" +#include "qapi/qmp/qerror.h" +#include "qemu/error-report.h" +#include "qom/object_interfaces.h" +#include "sysemu/vhost-user-backend.h" +#include "sysemu/kvm.h" +#include "io/channel-command.h" +#include "hw/virtio/virtio-bus.h" + +static bool +ioeventfd_enabled(void) +{ + return kvm_enabled() && kvm_eventfds_enabled(); +} + +int +vhost_user_backend_dev_init(VhostUserBackend *b, VirtIODevice *vdev, + unsigned nvqs, Error **errp) +{ + int ret; + + assert(!b->vdev && vdev); + + if (!ioeventfd_enabled()) { + error_setg(errp, "vhost initialization failed: requires kvm"); + return -1; + } + + if (!vhost_user_init(&b->vhost_user, &b->chr, errp)) { + return -1; + } + + b->vdev =3D vdev; + b->dev.nvqs =3D nvqs; + b->dev.vqs =3D g_new(struct vhost_virtqueue, nvqs); + + ret =3D vhost_dev_init(&b->dev, &b->vhost_user, VHOST_BACKEND_TYPE_USE= R, 0); + if (ret < 0) { + error_setg_errno(errp, -ret, "vhost initialization failed"); + return -1; + } + + return 0; +} + +void +vhost_user_backend_start(VhostUserBackend *b) +{ + BusState *qbus =3D BUS(qdev_get_parent_bus(DEVICE(b->vdev))); + VirtioBusClass *k =3D VIRTIO_BUS_GET_CLASS(qbus); + int ret, i ; + + if (b->started) { + return; + } + + if (!k->set_guest_notifiers) { + error_report("binding does not support guest notifiers"); + return; + } + + ret =3D vhost_dev_enable_notifiers(&b->dev, b->vdev); + if (ret < 0) { + return; + } + + ret =3D k->set_guest_notifiers(qbus->parent, b->dev.nvqs, true); + if (ret < 0) { + error_report("Error binding guest notifier"); + goto err_host_notifiers; + } + + b->dev.acked_features =3D b->vdev->guest_features; + ret =3D vhost_dev_start(&b->dev, b->vdev); + if (ret < 0) { + error_report("Error start vhost dev"); + goto err_guest_notifiers; + } + + /* guest_notifier_mask/pending not used yet, so just unmask + * everything here. virtio-pci will do the right thing by + * enabling/disabling irqfd. + */ + for (i =3D 0; i < b->dev.nvqs; i++) { + vhost_virtqueue_mask(&b->dev, b->vdev, + b->dev.vq_index + i, false); + } + + b->started =3D true; + return; + +err_guest_notifiers: + k->set_guest_notifiers(qbus->parent, b->dev.nvqs, false); +err_host_notifiers: + vhost_dev_disable_notifiers(&b->dev, b->vdev); +} + +void +vhost_user_backend_stop(VhostUserBackend *b) +{ + BusState *qbus =3D BUS(qdev_get_parent_bus(DEVICE(b->vdev))); + VirtioBusClass *k =3D VIRTIO_BUS_GET_CLASS(qbus); + int ret =3D 0; + + if (!b->started) { + return; + } + + vhost_dev_stop(&b->dev, b->vdev); + + if (k->set_guest_notifiers) { + ret =3D k->set_guest_notifiers(qbus->parent, + b->dev.nvqs, false); + if (ret < 0) { + error_report("vhost guest notifier cleanup failed: %d", ret); + } + } + assert(ret >=3D 0); + + vhost_dev_disable_notifiers(&b->dev, b->vdev); + b->started =3D false; +} + +static void set_chardev(Object *obj, const char *value, Error **errp) +{ + VhostUserBackend *b =3D VHOST_USER_BACKEND(obj); + Chardev *chr; + + if (b->completed) { + error_setg(errp, QERR_PERMISSION_DENIED); + return; + } + + g_free(b->chr_name); + b->chr_name =3D g_strdup(value); + + chr =3D qemu_chr_find(b->chr_name); + if (chr =3D=3D NULL) { + error_set(errp, ERROR_CLASS_DEVICE_NOT_FOUND, + "Chardev '%s' not found", b->chr_name); + return; + } + + if (!qemu_chr_fe_init(&b->chr, chr, errp)) { + return; + } + + b->completed =3D true; + /* could call vhost_dev_init() so early message can be exchanged */ +} + +static char *get_chardev(Object *obj, Error **errp) +{ + VhostUserBackend *b =3D VHOST_USER_BACKEND(obj); + Chardev *chr =3D qemu_chr_fe_get_driver(&b->chr); + + if (chr && chr->label) { + return g_strdup(chr->label); + } + + return NULL; +} + +static void vhost_user_backend_init(Object *obj) +{ + object_property_add_str(obj, "chardev", get_chardev, set_chardev, NULL= ); +} + +static void vhost_user_backend_finalize(Object *obj) +{ + VhostUserBackend *b =3D VHOST_USER_BACKEND(obj); + + g_free(b->dev.vqs); + g_free(b->chr_name); + + vhost_user_cleanup(&b->vhost_user); + qemu_chr_fe_deinit(&b->chr, true); +} + +static const TypeInfo vhost_user_backend_info =3D { + .name =3D TYPE_VHOST_USER_BACKEND, + .parent =3D TYPE_OBJECT, + .instance_size =3D sizeof(VhostUserBackend), + .instance_init =3D vhost_user_backend_init, + .instance_finalize =3D vhost_user_backend_finalize, + .class_size =3D sizeof(VhostUserBackendClass), +}; + +static void register_types(void) +{ + type_register_static(&vhost_user_backend_info); +} + +type_init(register_types); diff --git a/MAINTAINERS b/MAINTAINERS index 66ddbda9c958..2e40390ebcdb 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1478,6 +1478,8 @@ F: hw/*/*vhost* F: docs/interop/vhost-user.json F: docs/interop/vhost-user.txt F: contrib/vhost-user-*/ +F: backends/vhost-user.c +F: include/sysemu/vhost-user-backend.h =20 virtio M: Michael S. Tsirkin diff --git a/backends/Makefile.objs b/backends/Makefile.objs index ff619d31b461..981e8e122f2c 100644 --- a/backends/Makefile.objs +++ b/backends/Makefile.objs @@ -14,4 +14,6 @@ common-obj-y +=3D cryptodev-vhost.o common-obj-$(CONFIG_VHOST_CRYPTO) +=3D cryptodev-vhost-user.o endif =20 +common-obj-$(call land,$(CONFIG_VHOST_USER),$(CONFIG_VIRTIO)) +=3D vhost-u= ser.o + common-obj-$(CONFIG_LINUX) +=3D hostmem-memfd.o --=20 2.18.1 From nobody Sun May 5 06:59:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1557731458; cv=none; d=zoho.com; s=zohoarc; b=BRrSuYzYj8entxfgmGcVUNll8qTPamORJIYvhhYEjBT4U+qU/uXHliMrqRFWFm+aJw5eVrHbv5fQRZseWDBGRyi+TFg1I8CU31/Rd1E/pkhgjYJZD+jqqWZ19A4b0bC2GxXjbriQ7mAOh6gWaWVtYVHySNmJHAcEvG1YqPjLSQ4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557731458; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=o/8jxZ6gU9jm9Ksfa9wuqIwPggbLrw6jB6+SShr9ZgA=; b=Zr3HciaV9k/mIpyrLRVKO4pxrmjrpZQBSQjeB3t94s36ZyuhAdj5l0VKEdgfIUkKZzcL7BWC2maHdPTIOhnSwt+lzo8iG4AF4dQ/qDZnaa5kwbEpmKdd3gQQQm7wk8gnGuBpbDNCCA+hrzyGYpw3apoO97gLXzlhBpD3Yb89IUU= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1557731458431492.85354478942236; Mon, 13 May 2019 00:10:58 -0700 (PDT) Received: from localhost ([127.0.0.1]:52270 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQ56q-0004DU-8P for importer@patchew.org; Mon, 13 May 2019 03:10:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42955) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQ54E-0002Mr-QA for qemu-devel@nongnu.org; Mon, 13 May 2019 03:08:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hQ4pv-0002KI-A8 for qemu-devel@nongnu.org; Mon, 13 May 2019 02:53:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46136) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hQ4pv-0002Hz-0Y for qemu-devel@nongnu.org; Mon, 13 May 2019 02:53:23 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4843E859FF for ; Mon, 13 May 2019 06:53:18 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-74.ams2.redhat.com [10.36.117.74]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2CAB819C67; Mon, 13 May 2019 06:53:11 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 614D2A1EA; Mon, 13 May 2019 08:53:10 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 13 May 2019 08:53:07 +0200 Message-Id: <20190513065310.10263-5-kraxel@redhat.com> In-Reply-To: <20190513065310.10263-1-kraxel@redhat.com> References: <20190513065310.10263-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 13 May 2019 06:53:18 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 4/7] Add vhost-user-input-pci X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Gerd Hoffmann , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Marc-Andr=C3=A9 Lureau Add a new virtio-input device, which connects to a vhost-user backend. Instead of reading configuration directly from an input device / evdev (like virtio-input-host), it reads it over vhost-user protocol with {SET,GET}_CONFIG messages. The vhost-user-backend handles the queues & events setup. Signed-off-by: Marc-Andr=C3=A9 Lureau Message-id: 20190503130034.24916-5-marcandre.lureau@redhat.com [ kraxel: drop -{non-,}transitional variants ] [ kraxel: fix "make check" on !linux ] Signed-off-by: Gerd Hoffmann --- include/hw/virtio/virtio-input.h | 14 ++++ hw/input/vhost-user-input.c | 129 +++++++++++++++++++++++++++++++ hw/virtio/vhost-user-input-pci.c | 50 ++++++++++++ MAINTAINERS | 1 + hw/input/Kconfig | 5 ++ hw/input/Makefile.objs | 1 + hw/virtio/Makefile.objs | 1 + 7 files changed, 201 insertions(+) create mode 100644 hw/input/vhost-user-input.c create mode 100644 hw/virtio/vhost-user-input-pci.c diff --git a/include/hw/virtio/virtio-input.h b/include/hw/virtio/virtio-in= put.h index 054c38836f11..4fca03e7969e 100644 --- a/include/hw/virtio/virtio-input.h +++ b/include/hw/virtio/virtio-input.h @@ -2,6 +2,7 @@ #define QEMU_VIRTIO_INPUT_H =20 #include "ui/input.h" +#include "sysemu/vhost-user-backend.h" =20 /* ----------------------------------------------------------------- */ /* virtio input protocol */ @@ -42,11 +43,18 @@ typedef struct virtio_input_event virtio_input_event; #define VIRTIO_INPUT_HOST_GET_PARENT_CLASS(obj) \ OBJECT_GET_PARENT_CLASS(obj, TYPE_VIRTIO_INPUT_HOST) =20 +#define TYPE_VHOST_USER_INPUT "vhost-user-input" +#define VHOST_USER_INPUT(obj) \ + OBJECT_CHECK(VHostUserInput, (obj), TYPE_VHOST_USER_INPUT) +#define VHOST_USER_INPUT_GET_PARENT_CLASS(obj) \ + OBJECT_GET_PARENT_CLASS(obj, TYPE_VHOST_USER_INPUT) + typedef struct VirtIOInput VirtIOInput; typedef struct VirtIOInputClass VirtIOInputClass; typedef struct VirtIOInputConfig VirtIOInputConfig; typedef struct VirtIOInputHID VirtIOInputHID; typedef struct VirtIOInputHost VirtIOInputHost; +typedef struct VHostUserInput VHostUserInput; =20 struct VirtIOInputConfig { virtio_input_config config; @@ -98,6 +106,12 @@ struct VirtIOInputHost { int fd; }; =20 +struct VHostUserInput { + VirtIOInput parent_obj; + + VhostUserBackend *vhost; +}; + void virtio_input_send(VirtIOInput *vinput, virtio_input_event *event); void virtio_input_init_config(VirtIOInput *vinput, virtio_input_config *config); diff --git a/hw/input/vhost-user-input.c b/hw/input/vhost-user-input.c new file mode 100644 index 000000000000..6da497b1a8a9 --- /dev/null +++ b/hw/input/vhost-user-input.c @@ -0,0 +1,129 @@ +/* + * This work is licensed under the terms of the GNU GPL, version 2 or + * (at your option) any later version. See the COPYING file in the + * top-level directory. + */ + +#include "qemu/osdep.h" +#include "qemu/error-report.h" +#include "qapi/error.h" +#include "qemu-common.h" + +#include "hw/qdev.h" +#include "hw/virtio/virtio-input.h" + +static int vhost_input_config_change(struct vhost_dev *dev) +{ + error_report("vhost-user-input: unhandled backend config change"); + return -1; +} + +static const VhostDevConfigOps config_ops =3D { + .vhost_dev_config_notifier =3D vhost_input_config_change, +}; + +static void vhost_input_realize(DeviceState *dev, Error **errp) +{ + VHostUserInput *vhi =3D VHOST_USER_INPUT(dev); + VirtIOInput *vinput =3D VIRTIO_INPUT(dev); + VirtIODevice *vdev =3D VIRTIO_DEVICE(dev); + + vhost_dev_set_config_notifier(&vhi->vhost->dev, &config_ops); + vinput->cfg_size =3D sizeof_field(virtio_input_config, u); + if (vhost_user_backend_dev_init(vhi->vhost, vdev, 2, errp) =3D=3D -1) { + return; + } +} + +static void vhost_input_change_active(VirtIOInput *vinput) +{ + VHostUserInput *vhi =3D VHOST_USER_INPUT(vinput); + + if (vinput->active) { + vhost_user_backend_start(vhi->vhost); + } else { + vhost_user_backend_stop(vhi->vhost); + } +} + +static void vhost_input_get_config(VirtIODevice *vdev, uint8_t *config_dat= a) +{ + VirtIOInput *vinput =3D VIRTIO_INPUT(vdev); + VHostUserInput *vhi =3D VHOST_USER_INPUT(vdev); + int ret; + + memset(config_data, 0, vinput->cfg_size); + + ret =3D vhost_dev_get_config(&vhi->vhost->dev, config_data, vinput->cf= g_size); + if (ret) { + error_report("vhost-user-input: get device config space failed"); + return; + } +} + +static void vhost_input_set_config(VirtIODevice *vdev, + const uint8_t *config_data) +{ + VHostUserInput *vhi =3D VHOST_USER_INPUT(vdev); + int ret; + + ret =3D vhost_dev_set_config(&vhi->vhost->dev, config_data, + 0, sizeof(virtio_input_config), + VHOST_SET_CONFIG_TYPE_MASTER); + if (ret) { + error_report("vhost-user-input: set device config space failed"); + return; + } + + virtio_notify_config(vdev); +} + +static const VMStateDescription vmstate_vhost_input =3D { + .name =3D "vhost-user-input", + .unmigratable =3D 1, +}; + +static void vhost_input_class_init(ObjectClass *klass, void *data) +{ + VirtIOInputClass *vic =3D VIRTIO_INPUT_CLASS(klass); + VirtioDeviceClass *vdc =3D VIRTIO_DEVICE_CLASS(klass); + DeviceClass *dc =3D DEVICE_CLASS(klass); + + dc->vmsd =3D &vmstate_vhost_input; + vdc->get_config =3D vhost_input_get_config; + vdc->set_config =3D vhost_input_set_config; + vic->realize =3D vhost_input_realize; + vic->change_active =3D vhost_input_change_active; +} + +static void vhost_input_init(Object *obj) +{ + VHostUserInput *vhi =3D VHOST_USER_INPUT(obj); + + vhi->vhost =3D VHOST_USER_BACKEND(object_new(TYPE_VHOST_USER_BACKEND)); + object_property_add_alias(obj, "chardev", + OBJECT(vhi->vhost), "chardev", &error_abort); +} + +static void vhost_input_finalize(Object *obj) +{ + VHostUserInput *vhi =3D VHOST_USER_INPUT(obj); + + object_unref(OBJECT(vhi->vhost)); +} + +static const TypeInfo vhost_input_info =3D { + .name =3D TYPE_VHOST_USER_INPUT, + .parent =3D TYPE_VIRTIO_INPUT, + .instance_size =3D sizeof(VHostUserInput), + .instance_init =3D vhost_input_init, + .instance_finalize =3D vhost_input_finalize, + .class_init =3D vhost_input_class_init, +}; + +static void vhost_input_register_types(void) +{ + type_register_static(&vhost_input_info); +} + +type_init(vhost_input_register_types) diff --git a/hw/virtio/vhost-user-input-pci.c b/hw/virtio/vhost-user-input-= pci.c new file mode 100644 index 000000000000..ae9cff9aed5e --- /dev/null +++ b/hw/virtio/vhost-user-input-pci.c @@ -0,0 +1,50 @@ +/* + * This work is licensed under the terms of the GNU LGPL, version 2 or + * later. See the COPYING.LIB file in the top-level directory. + */ + +#include "qemu/osdep.h" + +#include "hw/virtio/virtio.h" +#include "hw/virtio/virtio-input.h" +#include "qapi/error.h" +#include "qemu/error-report.h" +#include "virtio-pci.h" + +typedef struct VHostUserInputPCI VHostUserInputPCI; + +#define TYPE_VHOST_USER_INPUT_PCI "vhost-user-input-pci" + +#define VHOST_USER_INPUT_PCI(obj) \ + OBJECT_CHECK(VHostUserInputPCI, (obj), TYPE_VHOST_USER_INPUT_PCI) + +struct VHostUserInputPCI { + VirtIOPCIProxy parent_obj; + VHostUserInput vhi; +}; + +static void vhost_user_input_pci_instance_init(Object *obj) +{ + VHostUserInputPCI *dev =3D VHOST_USER_INPUT_PCI(obj); + + virtio_instance_init_common(obj, &dev->vhi, sizeof(dev->vhi), + TYPE_VHOST_USER_INPUT); + + object_property_add_alias(obj, "chardev", + OBJECT(&dev->vhi), "chardev", + &error_abort); +} + +static const VirtioPCIDeviceTypeInfo vhost_user_input_pci_info =3D { + .generic_name =3D TYPE_VHOST_USER_INPUT_PCI, + .parent =3D TYPE_VIRTIO_INPUT_PCI, + .instance_size =3D sizeof(VHostUserInputPCI), + .instance_init =3D vhost_user_input_pci_instance_init, +}; + +static void vhost_user_input_pci_register(void) +{ + virtio_pci_types_register(&vhost_user_input_pci_info); +} + +type_init(vhost_user_input_pci_register) diff --git a/MAINTAINERS b/MAINTAINERS index 2e40390ebcdb..6d4a10b3903f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1521,6 +1521,7 @@ L: qemu-s390x@nongnu.org virtio-input M: Gerd Hoffmann S: Maintained +F: hw/input/vhost-user-input.c F: hw/input/virtio-input*.c F: include/hw/virtio/virtio-input.h =20 diff --git a/hw/input/Kconfig b/hw/input/Kconfig index e2e66f085862..50e55e353847 100644 --- a/hw/input/Kconfig +++ b/hw/input/Kconfig @@ -29,5 +29,10 @@ config VIRTIO_INPUT_HOST default y depends on VIRTIO && LINUX =20 +config VHOST_USER_INPUT + bool + default y + depends on VIRTIO_INPUT && VHOST_USER + config TSC210X bool diff --git a/hw/input/Makefile.objs b/hw/input/Makefile.objs index c8b00f71ec50..3eddf00f2bba 100644 --- a/hw/input/Makefile.objs +++ b/hw/input/Makefile.objs @@ -12,6 +12,7 @@ common-obj-$(CONFIG_VIRTIO_INPUT) +=3D virtio-input-hid.o ifeq ($(CONFIG_LINUX),y) common-obj-$(CONFIG_VIRTIO_INPUT) +=3D virtio-input-host.o endif +common-obj-$(CONFIG_VHOST_USER_INPUT) +=3D vhost-user-input.o =20 obj-$(CONFIG_MILKYMIST) +=3D milkymist-softusb.o obj-$(CONFIG_PXA2XX) +=3D pxa2xx_keypad.o diff --git a/hw/virtio/Makefile.objs b/hw/virtio/Makefile.objs index f2ab667a2118..5570ea8df805 100644 --- a/hw/virtio/Makefile.objs +++ b/hw/virtio/Makefile.objs @@ -17,6 +17,7 @@ obj-$(CONFIG_VHOST_VSOCK) +=3D vhost-vsock.o ifeq ($(CONFIG_VIRTIO_PCI),y) obj-$(CONFIG_VHOST_VSOCK) +=3D vhost-vsock-pci.o obj-$(CONFIG_VHOST_USER_BLK) +=3D vhost-user-blk-pci.o +obj-$(CONFIG_VHOST_USER_INPUT) +=3D vhost-user-input-pci.o obj-$(CONFIG_VHOST_USER_SCSI) +=3D vhost-user-scsi-pci.o obj-$(CONFIG_VHOST_SCSI) +=3D vhost-scsi-pci.o obj-$(CONFIG_VIRTIO_INPUT_HOST) +=3D virtio-input-host-pci.o --=20 2.18.1 From nobody Sun May 5 06:59:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1557731423; cv=none; d=zoho.com; s=zohoarc; b=QbbAffSXj3ct0mXzwnj+C0zZNd8Zbjp2vbkV73rGvdFciJgHTk+CZ2Vn/ip4x4m+Z60q4NIackuEvpafQs+irZ+V/MxERc3nuT9dA4xiV9jjblD6XnU2ZA4dIke08uKgUoyzqT9e7NSvbpz96dv9PxfVd8MCuoUpm/zrzRmPgt4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557731423; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=cdzbYu7ZpLM8f1BYPXoajwb+CjdxJ7wtVjblZCnuTcY=; b=hP0LOe7yU6LeEqwpZIYNEjRV3mIz9vX8tXUNGovgBOXPLQP8u4pLKtpPUDmdgtAuJH4TpSZMaJab4z1rUvCbeZvKjB52kAccLnzbK4UCWfWnuP4Es6jbeKtMvGfJbYL9H/XfBOPHXEKZTT82vXS7+Pu42tLIahiitbsLRqY8OI4= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1557731423939556.4900610040022; Mon, 13 May 2019 00:10:23 -0700 (PDT) Received: from localhost ([127.0.0.1]:52236 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQ56G-0003er-Uj for importer@patchew.org; Mon, 13 May 2019 03:10:17 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43174) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQ54E-0002ST-70 for qemu-devel@nongnu.org; Mon, 13 May 2019 03:08:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hQ4pv-0002Jq-3B for qemu-devel@nongnu.org; Mon, 13 May 2019 02:53:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43466) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hQ4pt-0002Hv-35 for qemu-devel@nongnu.org; Mon, 13 May 2019 02:53:22 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1DA44882F0 for ; Mon, 13 May 2019 06:53:18 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-74.ams2.redhat.com [10.36.117.74]) by smtp.corp.redhat.com (Postfix) with ESMTP id A759019C6A; Mon, 13 May 2019 06:53:16 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 6986BA208; Mon, 13 May 2019 08:53:10 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 13 May 2019 08:53:08 +0200 Message-Id: <20190513065310.10263-6-kraxel@redhat.com> In-Reply-To: <20190513065310.10263-1-kraxel@redhat.com> References: <20190513065310.10263-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 13 May 2019 06:53:18 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 5/7] util: simplify unix_listen() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Gerd Hoffmann , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Marc-Andr=C3=A9 Lureau The only caller of unix_listen() left is qga/channel-posix.c. There is no need to deal with legacy coma-trailing options ",...". Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Daniel P. Berrang=C3=A9 Message-id: 20190503130034.24916-6-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann --- util/qemu-sockets.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c index ba6335e71a95..8850a280a84b 100644 --- a/util/qemu-sockets.c +++ b/util/qemu-sockets.c @@ -970,26 +970,12 @@ static int unix_connect_saddr(UnixSocketAddress *sadd= r, Error **errp) /* compatibility wrapper */ int unix_listen(const char *str, Error **errp) { - char *path, *optstr; - int sock, len; UnixSocketAddress *saddr; + int sock; =20 saddr =3D g_new0(UnixSocketAddress, 1); - - optstr =3D strchr(str, ','); - if (optstr) { - len =3D optstr - str; - if (len) { - path =3D g_malloc(len+1); - snprintf(path, len+1, "%.*s", len, str); - saddr->path =3D path; - } - } else { - saddr->path =3D g_strdup(str); - } - + saddr->path =3D g_strdup(str); sock =3D unix_listen_saddr(saddr, errp); - qapi_free_UnixSocketAddress(saddr); return sock; } --=20 2.18.1 From nobody Sun May 5 06:59:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1557731472; cv=none; d=zoho.com; s=zohoarc; b=Lu42//rXAkliFZP5JM5lgaO4vKVpYf9Y/QUGPDx1ki54tj9MMlwzByoccyV5Xb6DzUL9vUUUFvHDzhhCdHPlro7m+h3gotxvk73snxT7wwjKxLd7SAJxlH3a412ri+IsayvFhGCdDDzWQ2vWXiUwRXK1+OXvyPvsX/R8ZItHfYM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557731472; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=vCrWQaQnuS0OxVwla/nLTrbdTPDumeAT9/P0sZK++9Y=; b=jf7ACFpehJbJ4hZPV8qS9KtT8RhCPEnz971ABjH1ayvDygBsnY6FTt+bFVWLqf65xw2+BowFRI1PjVUCkiWg1ZiqHyPKdCXSSB2sWS8mQVir/GVb+dxtAyAOroiDzSHvkgHhhXZV7gh3PsSquUyw/qJEbZA4n5xe1EvLyJ7s+2k= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1557731472227685.1592853441871; Mon, 13 May 2019 00:11:12 -0700 (PDT) Received: from localhost ([127.0.0.1]:52272 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQ576-0004Qz-3H for importer@patchew.org; Mon, 13 May 2019 03:11:08 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43030) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQ54D-0002RU-HG for qemu-devel@nongnu.org; Mon, 13 May 2019 03:08:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hQ4pv-0002Jx-3j for qemu-devel@nongnu.org; Mon, 13 May 2019 02:53:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45890) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hQ4pt-0002I5-3r for qemu-devel@nongnu.org; Mon, 13 May 2019 02:53:23 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9CD8DF74CD for ; Mon, 13 May 2019 06:53:18 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-74.ams2.redhat.com [10.36.117.74]) by smtp.corp.redhat.com (Postfix) with ESMTP id A9F9C6B8C8; Mon, 13 May 2019 06:53:16 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 71DFCA212; Mon, 13 May 2019 08:53:10 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 13 May 2019 08:53:09 +0200 Message-Id: <20190513065310.10263-7-kraxel@redhat.com> In-Reply-To: <20190513065310.10263-1-kraxel@redhat.com> References: <20190513065310.10263-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 13 May 2019 06:53:18 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 6/7] virtio-input-host-pci: cleanup types X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Gerd Hoffmann , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" virtio input is virtio-1.0 only, so we don't need the -transitional and -non-transitional variants. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-Andr=C3=A9 Lureau Message-id: 20190510105137.17481-1-kraxel@redhat.com --- hw/virtio/virtio-input-host-pci.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hw/virtio/virtio-input-host-pci.c b/hw/virtio/virtio-input-hos= t-pci.c index 725a51ad30b4..124c4f344742 100644 --- a/hw/virtio/virtio-input-host-pci.c +++ b/hw/virtio/virtio-input-host-pci.c @@ -13,7 +13,7 @@ =20 typedef struct VirtIOInputHostPCI VirtIOInputHostPCI; =20 -#define TYPE_VIRTIO_INPUT_HOST_PCI "virtio-input-host-pci-base" +#define TYPE_VIRTIO_INPUT_HOST_PCI "virtio-input-host-pci" #define VIRTIO_INPUT_HOST_PCI(obj) \ OBJECT_CHECK(VirtIOInputHostPCI, (obj), TYPE_VIRTIO_INPUT_HOST_PCI) =20 @@ -31,10 +31,7 @@ static void virtio_host_initfn(Object *obj) } =20 static const VirtioPCIDeviceTypeInfo virtio_input_host_pci_info =3D { - .base_name =3D TYPE_VIRTIO_INPUT_HOST_PCI, - .generic_name =3D "virtio-input-host-pci", - .transitional_name =3D "virtio-input-host-pci-transitional", - .non_transitional_name =3D "virtio-input-host-pci-non-transitional", + .generic_name =3D TYPE_VIRTIO_INPUT_HOST_PCI, .parent =3D TYPE_VIRTIO_INPUT_PCI, .instance_size =3D sizeof(VirtIOInputHostPCI), .instance_init =3D virtio_host_initfn, --=20 2.18.1 From nobody Sun May 5 06:59:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1557731647; cv=none; d=zoho.com; s=zohoarc; b=cTzCXXOdXpVBJa1vglwMvso5Czr94B0Z3KyE/8S0jGpVbqiW2+KW1zYf6vBMp/L1E1IctL8huTTYL8iMSDgyD86N0HTT+ecX44OBlBFHOPtlDIgKyDf9EJNYB5Oc3Ft/+NcbJcuRh424HHjftWfNbt2CFQY0AZnNR5JAEEg/bSo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557731647; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=HvMzDVfRjJK2obpwAmAj/tNPzywA8vqR0GaFY/eoBi4=; b=IvjRtN0RcLgUkhoWE+0sQoA2C05igR1X/pj3KA+e/B4xhK5851WOpXXOOH5IS51CtpzjheKGnu3KRYkduTXT//LvFDEzkARmn+N3Te8e2CQqpzs6OgxrR7nULHk5c1nmF1WwEJZ3WPL9cqOkTNCnvqK8AaUkgodSF6eD7NHSUio= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1557731647528549.2943690901637; Mon, 13 May 2019 00:14:07 -0700 (PDT) Received: from localhost ([127.0.0.1]:52296 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQ59w-00071P-88 for importer@patchew.org; Mon, 13 May 2019 03:14:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43030) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQ54F-0002RU-O2 for qemu-devel@nongnu.org; Mon, 13 May 2019 03:08:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hQ4pv-0002K2-3r for qemu-devel@nongnu.org; Mon, 13 May 2019 02:53:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45898) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hQ4pt-0002Ia-4F for qemu-devel@nongnu.org; Mon, 13 May 2019 02:53:23 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3EDC64E93D for ; Mon, 13 May 2019 06:53:20 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-74.ams2.redhat.com [10.36.117.74]) by smtp.corp.redhat.com (Postfix) with ESMTP id EC75368D87; Mon, 13 May 2019 06:53:18 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 7B44EA213; Mon, 13 May 2019 08:53:10 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 13 May 2019 08:53:10 +0200 Message-Id: <20190513065310.10263-8-kraxel@redhat.com> In-Reply-To: <20190513065310.10263-1-kraxel@redhat.com> References: <20190513065310.10263-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 13 May 2019 06:53:20 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 7/7] virtio-input: fix Kconfig dependency and Makefile X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Gerd Hoffmann , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Make VIRTIO_INPUT_HOST depend on VIRTIO_INPUT. Use CONFIG_VIRTIO_INPUT_HOST in Makefile. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-Andr=C3=A9 Lureau Message-id: 20190510105137.17481-2-kraxel@redhat.com --- hw/input/Kconfig | 2 +- hw/input/Makefile.objs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/input/Kconfig b/hw/input/Kconfig index 50e55e353847..889363d8aef1 100644 --- a/hw/input/Kconfig +++ b/hw/input/Kconfig @@ -27,7 +27,7 @@ config VIRTIO_INPUT config VIRTIO_INPUT_HOST bool default y - depends on VIRTIO && LINUX + depends on VIRTIO_INPUT && LINUX =20 config VHOST_USER_INPUT bool diff --git a/hw/input/Makefile.objs b/hw/input/Makefile.objs index 3eddf00f2bba..d1de30770854 100644 --- a/hw/input/Makefile.objs +++ b/hw/input/Makefile.objs @@ -9,9 +9,7 @@ common-obj-$(CONFIG_TSC2005) +=3D tsc2005.o =20 common-obj-$(CONFIG_VIRTIO_INPUT) +=3D virtio-input.o common-obj-$(CONFIG_VIRTIO_INPUT) +=3D virtio-input-hid.o -ifeq ($(CONFIG_LINUX),y) -common-obj-$(CONFIG_VIRTIO_INPUT) +=3D virtio-input-host.o -endif +common-obj-$(CONFIG_VIRTIO_INPUT_HOST) +=3D virtio-input-host.o common-obj-$(CONFIG_VHOST_USER_INPUT) +=3D vhost-user-input.o =20 obj-$(CONFIG_MILKYMIST) +=3D milkymist-softusb.o --=20 2.18.1