From patchwork Fri Feb 7 09:54:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1234837 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=QFRouoSM; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48DVzQ5HV7z9sRK for ; Fri, 7 Feb 2020 20:55:29 +1100 (AEDT) Received: from localhost ([::1]:53058 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j00MA-00046J-07 for incoming@patchwork.ozlabs.org; Fri, 07 Feb 2020 04:55:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40072) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j00Li-00045y-Aj for qemu-devel@nongnu.org; Fri, 07 Feb 2020 04:54:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j00Lg-00070H-Lu for qemu-devel@nongnu.org; Fri, 07 Feb 2020 04:54:57 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:46025 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j00Lg-0006yu-ID for qemu-devel@nongnu.org; Fri, 07 Feb 2020 04:54:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581069296; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AN5OEky6D4oYKbeemXq5L4usGQTYVf9ZivJAlrymxKg=; b=QFRouoSM8tkD1KsI1VEUMutdHfcWBCCZ8EenBeVuns4uhR0aKXysVDlKfV3DlYGpLEQWX8 tcgLf75U4AKZrMHCisnJKgTBrK0xg4dqBIbZrj3q9LE1Q+Me+YeOHVPg2p28egD7zSIM+Y 7FfEM2uZzo3Q3YzPNwcihuiMMcDzGuQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-217-N8qJ8B96NG6KOU_FL9T9fA-1; Fri, 07 Feb 2020 04:54:54 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 62133801FB4 for ; Fri, 7 Feb 2020 09:54:53 +0000 (UTC) Received: from thinkpad.redhat.com (ovpn-116-229.ams2.redhat.com [10.36.116.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 09CD78EA10; Fri, 7 Feb 2020 09:54:12 +0000 (UTC) From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PATCH v2 1/2] tests/vhost-user-bridge: move to contrib/ Date: Fri, 7 Feb 2020 10:54:11 +0100 Message-Id: <20200207095412.794912-1-lvivier@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-MC-Unique: N8qJ8B96NG6KOU_FL9T9fA-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , "Michael S. Tsirkin" , Juan Quintela , "Dr. David Alan Gilbert" , Stefan Hajnoczi , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" vhost-user-bridge is not a test. Move it to contrib/ and add it to the tools list. It will be built only if tools (--enable-tools) and vhost-user (--enable-vhost-user) are enabled (both are set by default). Suggested-by: Dr. David Alan Gilbert Signed-off-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Juan Quintela Reviewed-by: Stefan Hajnoczi --- Notes: v2: update docs Makefile | 3 +++ Makefile.objs | 1 + configure | 3 +++ contrib/vhost-user-bridge/Makefile.objs | 1 + tests/vhost-user-bridge.c => contrib/vhost-user-bridge/main.c | 0 docs/devel/migration.rst | 2 +- tests/Makefile.include | 1 - 7 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 contrib/vhost-user-bridge/Makefile.objs rename tests/vhost-user-bridge.c => contrib/vhost-user-bridge/main.c (100%) diff --git a/Makefile b/Makefile index 461d40bea6c2..23342a433e11 100644 --- a/Makefile +++ b/Makefile @@ -442,6 +442,7 @@ dummy := $(call unnest-vars,, \ libvhost-user-obj-y \ vhost-user-scsi-obj-y \ vhost-user-blk-obj-y \ + vhost-user-bridge-obj-y \ vhost-user-input-obj-y \ vhost-user-gpu-obj-y \ qga-vss-dll-obj-y \ @@ -672,6 +673,8 @@ vhost-user-scsi$(EXESUF): $(vhost-user-scsi-obj-y) libvhost-user.a $(call LINK, $^) vhost-user-blk$(EXESUF): $(vhost-user-blk-obj-y) libvhost-user.a $(call LINK, $^) +vhost-user-bridge$(EXESUF): $(vhost-user-bridge-obj-y) libvhost-user.a + $(call LINK, $^) rdmacm-mux$(EXESUF): LIBS += "-libumad" rdmacm-mux$(EXESUF): $(rdmacm-mux-obj-y) $(COMMON_LDADDS) diff --git a/Makefile.objs b/Makefile.objs index 26b9cff95436..0240100b9a17 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -109,6 +109,7 @@ vhost-user-scsi.o-cflags := $(LIBISCSI_CFLAGS) vhost-user-scsi.o-libs := $(LIBISCSI_LIBS) vhost-user-scsi-obj-y = contrib/vhost-user-scsi/ vhost-user-blk-obj-y = contrib/vhost-user-blk/ +vhost-user-bridge-obj-y = contrib/vhost-user-bridge/ rdmacm-mux-obj-y = contrib/rdmacm-mux/ vhost-user-input-obj-y = contrib/vhost-user-input/ vhost-user-gpu-obj-y = contrib/vhost-user-gpu/ diff --git a/configure b/configure index 115dc38085f3..0415eb5c99d3 100755 --- a/configure +++ b/configure @@ -6223,6 +6223,9 @@ if test "$want_tools" = "yes" ; then if [ "$curl" = "yes" ]; then tools="elf2dmp\$(EXESUF) $tools" fi + if [ "$vhost_user" = "yes" ]; then + tools="vhost-user-bridge\$(EXESUF) $tools" + fi fi if test "$softmmu" = yes ; then if test "$linux" = yes; then diff --git a/contrib/vhost-user-bridge/Makefile.objs b/contrib/vhost-user-bridge/Makefile.objs new file mode 100644 index 000000000000..36a8d9b49a05 --- /dev/null +++ b/contrib/vhost-user-bridge/Makefile.objs @@ -0,0 +1 @@ +vhost-user-bridge-obj-y = main.o diff --git a/tests/vhost-user-bridge.c b/contrib/vhost-user-bridge/main.c similarity index 100% rename from tests/vhost-user-bridge.c rename to contrib/vhost-user-bridge/main.c diff --git a/docs/devel/migration.rst b/docs/devel/migration.rst index e88918f7639e..d00424460e23 100644 --- a/docs/devel/migration.rst +++ b/docs/devel/migration.rst @@ -807,7 +807,7 @@ The Linux kernel userfault support works on `/dev/shm` memory and on `hugetlbfs` for hugetlbfs which may be a problem in some configurations). The vhost-user code in QEMU supports clients that have Postcopy support, -and the `vhost-user-bridge` (in `tests/`) and the DPDK package have changes +and the `vhost-user-bridge` (in `contrib/`) and the DPDK package have changes to support postcopy. The client needs to open a userfaultfd and register the areas diff --git a/tests/Makefile.include b/tests/Makefile.include index 2f1cafed720d..78cdbe91aed5 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -586,7 +586,6 @@ include $(SRC_PATH)/tests/qtest/Makefile.include tests/test-qga$(EXESUF): qemu-ga$(EXESUF) tests/test-qga$(EXESUF): tests/test-qga.o $(qtest-obj-y) -tests/vhost-user-bridge$(EXESUF): tests/vhost-user-bridge.o $(test-util-obj-y) libvhost-user.a SPEED = quick From patchwork Fri Feb 7 09:54:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1234836 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=SLVjxXiP; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48DVzQ5YQZz9sRl for ; Fri, 7 Feb 2020 20:55:29 +1100 (AEDT) Received: from localhost ([::1]:53068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j00MB-00049T-Hr for incoming@patchwork.ozlabs.org; Fri, 07 Feb 2020 04:55:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40121) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j00Ln-00046T-OH for qemu-devel@nongnu.org; Fri, 07 Feb 2020 04:55:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j00Lm-0007GG-Q3 for qemu-devel@nongnu.org; Fri, 07 Feb 2020 04:55:03 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:35936 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j00Lm-0007Fv-MU for qemu-devel@nongnu.org; Fri, 07 Feb 2020 04:55:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581069302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NCm0Mvx1br1jVA8CNGlevixp3HoXFeo0l1mtXsESuqo=; b=SLVjxXiPed2LwvfkZ/3QwJUjVH68pTQVhUzdlHNYcVPIOnfZ8PC94eW8o4e+SYreL0Fct2 QAHyVoYEs2StQEFA/klpthYKcYr0mHPhh05l6gfdxZOjwUXmHfERZLQdbpiCLY5b73ntwk F8ZK9rOC89yQ5tWE8ne9yTv9GGNwAxc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-350-8cR7c58GND-mrLWaRg0CoA-1; Fri, 07 Feb 2020 04:55:00 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id CA661802B86 for ; Fri, 7 Feb 2020 09:54:59 +0000 (UTC) Received: from thinkpad.redhat.com (ovpn-116-229.ams2.redhat.com [10.36.116.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id B7ABA90062; Fri, 7 Feb 2020 09:54:53 +0000 (UTC) From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PATCH v2 2/2] virtiofsd: add it to the tools list Date: Fri, 7 Feb 2020 10:54:12 +0100 Message-Id: <20200207095412.794912-2-lvivier@redhat.com> In-Reply-To: <20200207095412.794912-1-lvivier@redhat.com> References: <20200207095412.794912-1-lvivier@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-MC-Unique: 8cR7c58GND-mrLWaRg0CoA-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 205.139.110.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , "Michael S. Tsirkin" , Juan Quintela , "Dr. David Alan Gilbert" , Stefan Hajnoczi , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" it will be built only when tools are enabled (always enabled by default) Signed-off-by: Laurent Vivier Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Reviewed-by: Stefan Hajnoczi --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 23342a433e11..484fbb737858 100644 --- a/Makefile +++ b/Makefile @@ -327,7 +327,7 @@ HELPERS-y += vhost-user-gpu$(EXESUF) vhost-user-json-y += contrib/vhost-user-gpu/50-qemu-gpu.json endif -ifeq ($(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG),yyy) +ifeq ($(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG)$(CONFIG_TOOLS),yyyy) HELPERS-y += virtiofsd$(EXESUF) vhost-user-json-y += tools/virtiofsd/50-qemu-virtiofsd.json endif @@ -681,7 +681,7 @@ rdmacm-mux$(EXESUF): $(rdmacm-mux-obj-y) $(COMMON_LDADDS) $(call LINK, $^) # relies on Linux-specific syscalls -ifeq ($(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG),yyy) +ifeq ($(CONFIG_LINUX)$(CONFIG_SECCOMP)$(CONFIG_LIBCAP_NG)$(CONFIG_TOOLS),yyyy) virtiofsd$(EXESUF): $(virtiofsd-obj-y) libvhost-user.a $(COMMON_LDADDS) $(call LINK, $^) endif