From nobody Sat May 18 07:08:57 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1602062368; cv=none; d=zohomail.com; s=zohoarc; b=DKqVMrRx5jsEk2pb8kTCV52zITghhJLO5NeybwRzFyExxtzIL1dbp3oKkYrnXhNfs2v3tjtxdQYTxikmKQez2womiGAUYo4/j1ZeJR9Au8QDIN2fQ1K2iUpRee/7gfl9HhaKLZNLGaj1pVSx9mUiQXxdb0yUZQLnuLngjkNsscY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602062368; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=/mP9o8pHvHosCROBqb5AaDIhAMpAfp59IsZO5wea50I=; b=ARnGWl270pCBcR5StbfME9lN1HsZE5ahUCan1Ffdghkpt/oIvX/YtKTY6gNFvPivCV3rjvQWdiA+h312US1cpIFQRSEP28/4YvhU5eWhgAsu2TDZ0P5poTXS5/IO1XKvAHbSmIQIwRgEYoH8skdPhDBhlOIKjmn1T1ZSPenPhnQ= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1602062368720211.8647370136099; Wed, 7 Oct 2020 02:19:28 -0700 (PDT) Received: from localhost ([::1]:59452 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kQ5ba-00041s-5z for importer@patchew.org; Wed, 07 Oct 2020 05:19:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57598) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kQ5ap-0003cb-4M for qemu-devel@nongnu.org; Wed, 07 Oct 2020 05:18:39 -0400 Received: from mgwkm02.jp.fujitsu.com ([202.219.69.169]:24411) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kQ5am-0006rj-Kf for qemu-devel@nongnu.org; Wed, 07 Oct 2020 05:18:38 -0400 Received: from kw-mxq.gw.nic.fujitsu.com (unknown [192.168.231.130]) by mgwkm02.jp.fujitsu.com with smtp id 723c_79c3_00477b8b_16cf_40cb_bdfe_da28139454f4; Wed, 07 Oct 2020 18:18:27 +0900 Received: from g01jpfmpwyt03.exch.g01.fujitsu.local (g01jpfmpwyt03.exch.g01.fujitsu.local [10.128.193.57]) by kw-mxq.gw.nic.fujitsu.com (Postfix) with ESMTP id 969ABAC00B5 for ; Wed, 7 Oct 2020 18:18:26 +0900 (JST) Received: from G01JPEXCHYT14.g01.fujitsu.local (G01JPEXCHYT14.g01.fujitsu.local [10.128.194.53]) by g01jpfmpwyt03.exch.g01.fujitsu.local (Postfix) with ESMTP id C1AB946E7B2; Wed, 7 Oct 2020 18:18:25 +0900 (JST) Received: from luna3.soft.fujitsu.com (10.124.196.199) by G01JPEXCHYT14.g01.fujitsu.local (10.128.194.53) with Microsoft SMTP Server id 14.3.487.0; Wed, 7 Oct 2020 18:18:25 +0900 From: Misono Tomohiro To: , Subject: [PATCH] configure: add option for virtiofsd Date: Wed, 7 Oct 2020 18:29:13 +0900 Message-ID: <20201007092913.1524199-1-misono.tomohiro@jp.fujitsu.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SecurityPolicyCheck-GC: OK by FENCE-Mail X-TM-AS-GCONF: 00 Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=202.219.69.169; envelope-from=misono.tomohiro@fujitsu.com; helo=mgwkm02.jp.fujitsu.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/07 05:18:29 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: misono.tomohiro@jp.fujitsu.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Currently it is unknown whether virtiofsd will be built at configuration time. It will be automatically built when dependency is met. Also, required libraries are not clear. To make this clear, add configure option --{enable,disable}-virtiofsd. The default is the same as current (enabled if available) like many other options. When --enable-virtiofsd is given and dependency is not met, we get: ERROR: virtiofsd requires libcap-ng devel, seccomp devel, vhost user and = tools support In addition, configuration summary now includes virtiofsd entry: build virtiofs daemon: YES/NO Sidenote: this patch defines CONFIG_VIRTIOFSD for config-host.mak to avoid duplicate dependency check in tools/meson.build. Signed-off-by: Misono Tomohiro --- configure | 22 ++++++++++++++++++++++ docs/meson.build | 2 +- meson.build | 1 + tools/meson.build | 9 +-------- 4 files changed, 25 insertions(+), 9 deletions(-) diff --git a/configure b/configure index ecc8e90e8b..9d76e73014 100755 --- a/configure +++ b/configure @@ -403,6 +403,7 @@ netmap=3D"no" sdl=3D"auto" sdl_image=3D"auto" virtfs=3D"" +virtiofsd=3D"" mpath=3D"" vnc=3D"enabled" sparse=3D"no" @@ -1117,6 +1118,10 @@ for opt do ;; --enable-virtfs) virtfs=3D"yes" ;; + --disable-virtiofsd) virtiofsd=3D"no" + ;; + --enable-virtiofsd) virtiofsd=3D"yes" + ;; --disable-mpath) mpath=3D"no" ;; --enable-mpath) mpath=3D"yes" @@ -1873,6 +1878,7 @@ disabled with --disable-FEATURE, default is enabled i= f available: vnc-png PNG compression for VNC server cocoa Cocoa UI (Mac OS X only) virtfs VirtFS + virtiofsd build virtiofs daemon (virtiofsd) mpath Multipath persistent reservation passthrough xen xen backend driver support xen-pci-passthrough PCI passthrough support for Xen @@ -6344,6 +6350,15 @@ if test "$softmmu" =3D yes ; then fi virtfs=3Dno fi + if test "$virtiofsd" !=3D no && test "$cap_ng" =3D yes && test "$secco= mp" =3D yes \ + && test "$vhost_user" =3D yes && test "$want_tools" =3D yes; then + virtiofsd=3Dyes + else + if test "$virtiofsd" =3D yes; then + error_exit "virtiofsd requires libcap-ng devel, seccomp devel, vho= st user and tools support" + fi + virtiofsd=3Dno + fi if test "$mpath" !=3D no && test "$mpathpersist" =3D yes ; then mpath=3Dyes else @@ -6357,6 +6372,10 @@ if test "$softmmu" =3D yes ; then error_exit "VirtFS is supported only on Linux" fi virtfs=3Dno + if test "$virtiofsd" =3D yes; then + error_exit "virtiofsd is supported only on Linux" + fi + virtiofsd=3Dno if test "$mpath" =3D yes; then error_exit "Multipath is supported only on Linux" fi @@ -6901,6 +6920,9 @@ fi if test "$virtfs" =3D "yes" ; then echo "CONFIG_VIRTFS=3Dy" >> $config_host_mak fi +if test "$virtiofsd" =3D "yes" ; then + echo "CONFIG_VIRTIOFSD=3Dy" >> $config_host_mak +fi if test "$mpath" =3D "yes" ; then echo "CONFIG_MPATH=3Dy" >> $config_host_mak if test "$mpathpersist_new_api" =3D "yes"; then diff --git a/docs/meson.build b/docs/meson.build index 0340d489ac..6b9b277ef7 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -15,7 +15,7 @@ if build_docs 'qemu-nbd.8': (have_tools ? 'man8' : ''), 'qemu-trace-stap.1': (config_host.has_key('CONFIG_TRACE_SYSTEMTAP'= ) ? 'man1' : ''), 'virtfs-proxy-helper.1': (have_virtfs_proxy_helper ? 'man1' : ''), - 'virtiofsd.1': (have_virtiofsd ? 'man1' : ''), + 'virtiofsd.1': (config_host.has_key('CONFIG_VIRTIOFSD') ? 'man1' := ''), }, 'system': { 'qemu.1': 'man1', diff --git a/meson.build b/meson.build index 5b586afc38..a4ea961272 100644 --- a/meson.build +++ b/meson.build @@ -1336,6 +1336,7 @@ summary_info +=3D {'Audio drivers': config_host['= CONFIG_AUDIO_DRIVERS']} summary_info +=3D {'Block whitelist (rw)': config_host['CONFIG_BDRV_RW_WHI= TELIST']} summary_info +=3D {'Block whitelist (ro)': config_host['CONFIG_BDRV_RO_WHI= TELIST']} summary_info +=3D {'VirtFS support': config_host.has_key('CONFIG_VIRTFS= ')} +summary_info +=3D {'build virtiofs daemon': config_host.has_key('CONFIG_VI= RTIOFSD')} summary_info +=3D {'Multipath support': config_host.has_key('CONFIG_MPATH'= )} summary_info +=3D {'VNC support': vnc.found()} if vnc.found() diff --git a/tools/meson.build b/tools/meson.build index 513bd2ff4f..f1241982d6 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -1,10 +1,3 @@ -have_virtiofsd =3D (have_system and - have_tools and - 'CONFIG_LINUX' in config_host and=20 - 'CONFIG_SECCOMP' in config_host and - 'CONFIG_LIBCAP_NG' in config_host and - 'CONFIG_VHOST_USER' in config_host) - -if have_virtiofsd +if 'CONFIG_VIRTIOFSD' in config_host subdir('virtiofsd') endif --=20 2.25.4