From nobody Sat May 18 06:50:32 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=1602154863; cv=none; d=zohomail.com; s=zohoarc; b=hP8z9eN5RmRosDSj15E1AuBIpYouYbb0iRqqA48LBkwjB0dmu3fOLH04UGCD5APWI6VEvLlmycqx1mlQF6Dm7S5QxI5ADFjiCEU8Py9SCeQzB0jLYhgkkeRYUPJKpqrufGS39/Wq3Kjq5PGblUhW5OdOM/8W7qRUSDTEzTL2UiY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602154863; 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=nTh/NpES50HBRpnEJp8I0rHXTDEKVrMexL0/v7F3kmc=; b=jdDNnOrXuW6x4rqXW9vH7lkCc2/2GVXNr3E5cCBZXEFt0sUuU0A99njQ0tn4G7Hn+OEON4AJeWrH20NdmBEsAQiluR0AfWHqlg8AB7RBBbgi7jL3OmKU+RlMFoI4YBodCWMldSkKJJ9Nxi3xJad8ZHxKYoBWFUfAt51QSotVmAU= 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 160215486347394.00919988198643; Thu, 8 Oct 2020 04:01:03 -0700 (PDT) Received: from localhost ([::1]:57994 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kQT3c-0001pO-Nf for importer@patchew.org; Thu, 08 Oct 2020 06:21:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34198) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kQT2m-0001Bh-DE for qemu-devel@nongnu.org; Thu, 08 Oct 2020 06:21:04 -0400 Received: from mgwym03.jp.fujitsu.com ([211.128.242.42]:20715) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kQT2i-0003qq-P3 for qemu-devel@nongnu.org; Thu, 08 Oct 2020 06:21:03 -0400 Received: from yt-mxoi1.gw.nic.fujitsu.com (unknown [192.168.229.67]) by mgwym03.jp.fujitsu.com with smtp id 3eca_3af1_6dbc38ff_d992_4775_9323_2fe8187539f5; Thu, 08 Oct 2020 19:20:48 +0900 Received: from g01jpfmpwkw02.exch.g01.fujitsu.local (g01jpfmpwkw02.exch.g01.fujitsu.local [10.0.193.56]) by yt-mxoi1.gw.nic.fujitsu.com (Postfix) with ESMTP id BF868AC011C for ; Thu, 8 Oct 2020 19:20:46 +0900 (JST) Received: from G01JPEXCHKW14.g01.fujitsu.local (G01JPEXCHKW14.g01.fujitsu.local [10.0.194.53]) by g01jpfmpwkw02.exch.g01.fujitsu.local (Postfix) with ESMTP id E1F4032880B; Thu, 8 Oct 2020 19:20:45 +0900 (JST) Received: from luna3.soft.fujitsu.com (10.124.196.199) by G01JPEXCHKW14.g01.fujitsu.local (10.0.194.53) with Microsoft SMTP Server id 14.3.487.0; Thu, 8 Oct 2020 19:20:45 +0900 From: Misono Tomohiro To: , , Subject: [PATCH v2] configure: add option for virtiofsd Date: Thu, 8 Oct 2020 19:31:33 +0900 Message-ID: <20201008103133.2722903-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=211.128.242.42; envelope-from=misono.tomohiro@fujitsu.com; helo=mgwym03.jp.fujitsu.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/08 06:20:53 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: Problem encountered: virtiofsd requires libcap-ng-devel and seccom= p-devel or ERROR: Problem encountered: virtiofsd needs tools and vhost-user support In addition, configuration summary now includes virtiofsd entry: build virtiofs daemon: YES/NO Signed-off-by: Misono Tomohiro Reviewed-by: Dr. David Alan Gilbert --- This patch is based on current master branch v1 ... https://lore.kernel.org/qemu-devel/20201007092913.1524199-1-misono.t= omohiro@jp.fujitsu.com/ v1 -> v2: Update to follow the current meson build style configure | 8 +++++++- meson.build | 1 + meson_options.txt | 2 ++ tools/meson.build | 17 +++++++++++++++-- 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 28df227db5..2bd8419b1f 100755 --- a/configure +++ b/configure @@ -302,6 +302,7 @@ netmap=3D"no" sdl=3D"auto" sdl_image=3D"auto" virtfs=3D"" +virtiofsd=3D"auto" mpath=3D"auto" vnc=3D"enabled" sparse=3D"auto" @@ -1004,6 +1005,10 @@ for opt do ;; --enable-virtfs) virtfs=3D"yes" ;; + --disable-virtiofsd) virtiofsd=3D"disabled" + ;; + --enable-virtiofsd) virtiofsd=3D"enabled" + ;; --disable-mpath) mpath=3D"disabled" ;; --enable-mpath) mpath=3D"enabled" @@ -1761,6 +1766,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 @@ -7215,7 +7221,7 @@ NINJA=3D${ninja:-$PWD/ninjatool} $meson setup \ -Dxen=3D$xen -Dxen_pci_passthrough=3D$xen_pci_passthrough -Dtcg=3D$tcg \ -Dcocoa=3D$cocoa -Dmpath=3D$mpath -Dsdl=3D$sdl -Dsdl_image=3D$sdl_image \ -Dvnc=3D$vnc -Dvnc_sasl=3D$vnc_sasl -Dvnc_jpeg=3D$vnc_jpeg -Dvnc_png=3D$v= nc_png \ - -Dgettext=3D$gettext -Dxkbcommon=3D$xkbcommon -Du2f=3D$u2f \ + -Dgettext=3D$gettext -Dxkbcommon=3D$xkbcommon -Du2f=3D$u2f -Dvirtiofsd=3D= $virtiofsd \ -Dcapstone=3D$capstone -Dslirp=3D$slirp -Dfdt=3D$fdt \ $cross_arg \ "$PWD" "$source_path" diff --git a/meson.build b/meson.build index 17c89c87c6..a087239009 100644 --- a/meson.build +++ b/meson.build @@ -1843,6 +1843,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': have_virtiofsd} summary_info +=3D {'Multipath support': mpathpersist.found()} summary_info +=3D {'VNC support': vnc.found()} if vnc.found() diff --git a/meson_options.txt b/meson_options.txt index 1d3c94840a..80637ada63 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -48,6 +48,8 @@ option('vnc_sasl', type : 'feature', value : 'auto', description: 'SASL authentication for VNC server') option('xkbcommon', type : 'feature', value : 'auto', description: 'xkbcommon support') +option('virtiofsd', type: 'feature', value: 'auto', + description: 'build virtiofs daemon (virtiofsd)') =20 option('capstone', type: 'combo', value: 'auto', choices: ['disabled', 'enabled', 'auto', 'system', 'internal'], diff --git a/tools/meson.build b/tools/meson.build index 513bd2ff4f..76bf84df52 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -1,10 +1,23 @@ -have_virtiofsd =3D (have_system and +have_virtiofsd =3D (targetos =3D=3D 'linux' 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) =20 +if get_option('virtiofsd').enabled() + if not have_virtiofsd + if targetos !=3D 'linux' + error('virtiofsd requires Linux') + elif 'CONFIG_SECCOMP' not in config_host or 'CONFIG_LIBCAP_NG' not in = config_host + error('virtiofsd requires libcap-ng-devel and seccomp-devel') + elif not have_tools or 'CONFIG_VHOST_USER' not in config_host + error('virtiofsd needs tools and vhost-user support') + endif + endif +elif get_option('virtiofsd').disabled() or not have_system + have_virtiofsd =3D false +endif + if have_virtiofsd subdir('virtiofsd') endif --=20 2.25.4