From nobody Tue Feb 10 03:44:30 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1608198811; cv=none; d=zohomail.com; s=zohoarc; b=QMccvKg0CexFeqh4CEagHgkFItpOv8qabxPevN97oLrq5OaEbGWmG8Mf56OpqyKDJQrZQMJahEOHna61V/7wj+TZVU9ERhYNtC1Yfgm0Mtq92bAgSbftwYiY+zc1fKh2d0d3faNCi1hUQ3a89Q2vDLnxL7ahty0ng0p7BlcTkfk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608198811; h=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; bh=22tlcBFy15WQt1L+NeZp+J8Yakjh01n3hd2Pt4rd9E0=; b=D97DjYRBEicwsSZBRqONIZRc7dvJfZo3dOG+lvUPfquFBmUI0kWhIYJMqwSl0FEkC/8tAGklAKF0POMWts2xe5ZgdMkIgiBTof9kOHmH9m5lg2ulhYpDfq6oadK/WTHlsfdKpxXR0mNhF6HNF4aWf8s+6fGpkYAFiPGDcJVRprU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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; 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 1608198811648321.720600885571; Thu, 17 Dec 2020 01:53:31 -0800 (PST) Received: from localhost ([::1]:49658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kppyU-00016P-Bm for importer@patchew.org; Thu, 17 Dec 2020 04:53:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47836) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kppmY-0004ww-QV for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:41:10 -0500 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]:38239) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kppmP-0007m3-7H for qemu-devel@nongnu.org; Thu, 17 Dec 2020 04:41:09 -0500 Received: by mail-ed1-x52d.google.com with SMTP id cw27so27926110edb.5 for ; Thu, 17 Dec 2020 01:41:00 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id rs27sm3463677ejb.21.2020.12.17.01.40.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Dec 2020 01:40:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=22tlcBFy15WQt1L+NeZp+J8Yakjh01n3hd2Pt4rd9E0=; b=LAKme57YVdj8NuKQttmJHb115cJILdx6DQ0Dq08ESJ3l8tDuG04wYpTvciCqFDmmQF pKTjqXo8fMQjINcIExuC/XQ8iyP4E7s5SZArznBNw7brLsQ62hhCEY/VjnCgdsvnWLgk pLpcyVU3F8K8us50MfQv26OxfGhxOewZiROG1h7MiXXEVmLBZtFH5z99ey7YMfusYKnb LiPqnq/WkSStSpFRrn+k9yrQPW7Ak330WmsBgvQdht6uwnsHv7YCn0OntpcW1wDXQM5C ygSq+kt1v/8YpmMmLq2OIRN4xOxCiJ+RVCi3Ja0X4cHWkaoDsPPVQjf447FQH2hZ9SI7 CwRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=22tlcBFy15WQt1L+NeZp+J8Yakjh01n3hd2Pt4rd9E0=; b=K+wK0TzNezIvHl6nZTEgVFl99/0nLsZphW4W9lsgLo91EhOvDDrKTZjNjpNIaDzLGF 7zTFFDamLGL7DD5sjgIIQPfKmRasi1wnO06T3KR1gG7LVk/MqXnYCulHQ6jPB54zaB6c yAKh454sAIGMsu18d9lXHU80rbcwah/NU53XBzZTLdFXZh30mz1/hRz9z5XvYKLuWV3Z fQ81rsHGUFlWAmSolSjVGtcvyWg8vUGvvMGYrWV5YbP3ewliuA19KHF9K+chfK+B2TQQ VDE4es4hc7M9Arq7Znut0TkS4+3isAl0F1qLv8bMylxy5v0Hwy4W/N7gIGLLpCyWnCSd OFSA== X-Gm-Message-State: AOAM530m/VBcutxZLqf8VCcbJNfpbBfa2pd493ChVYMWmy1JTHlu7GeG fppItwUBjCa64kEKBamlJhwlQvOQq5g= X-Google-Smtp-Source: ABdhPJwuiXdXgE+15PLhLSk7reNZVY0/H2luoUU0RF1ktE3JE0o++3qh1tRePOPSjcWE4ZCRRUxYMQ== X-Received: by 2002:a50:f307:: with SMTP id p7mr37784054edm.368.1608198059871; Thu, 17 Dec 2020 01:40:59 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 15/18] virtfs: convert to meson Date: Thu, 17 Dec 2020 10:40:41 +0100 Message-Id: <20201217094044.46462-16-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201217094044.46462-1-pbonzini@redhat.com> References: <20201217094044.46462-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::52d; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52d.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: =?UTF-8?q?Marc-Andr=C3=83=C2=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 29 ++++------------------------- meson.build | 24 ++++++++++++++++++++++-- meson_options.txt | 11 +++++++---- 3 files changed, 33 insertions(+), 31 deletions(-) diff --git a/configure b/configure index 00c2d61a96..11d6f40f92 100755 --- a/configure +++ b/configure @@ -316,7 +316,7 @@ netmap=3D"no" sdl=3D"auto" sdl_image=3D"auto" virtiofsd=3D"auto" -virtfs=3D"$default_feature" +virtfs=3D"auto" libudev=3D"auto" mpath=3D"auto" vnc=3D"enabled" @@ -1005,9 +1005,9 @@ for opt do ;; --enable-qom-cast-debug) qom_cast_debug=3D"yes" ;; - --disable-virtfs) virtfs=3D"no" + --disable-virtfs) virtfs=3D"disabled" ;; - --enable-virtfs) virtfs=3D"yes" + --enable-virtfs) virtfs=3D"enabled" ;; --disable-libudev) libudev=3D"disabled" ;; @@ -5445,24 +5445,6 @@ if [ "$eventfd" =3D "yes" ]; then ivshmem=3Dyes fi =20 -if test "$softmmu" =3D yes ; then - if test "$linux" =3D yes; then - if test "$virtfs" !=3D no && test "$cap_ng" =3D yes && test "$attr" = =3D yes ; then - virtfs=3Dyes - else - if test "$virtfs" =3D yes; then - error_exit "VirtFS requires libcap-ng devel and libattr devel" - fi - virtfs=3Dno - fi - else - if test "$virtfs" =3D yes; then - error_exit "VirtFS is supported only on Linux" - fi - virtfs=3Dno - fi -fi - # Probe for guest agent support/options =20 if [ "$guest_agent" !=3D "no" ]; then @@ -5919,9 +5901,6 @@ fi if test "$libattr" =3D "yes" ; then echo "CONFIG_LIBATTR=3Dy" >> $config_host_mak fi -if test "$virtfs" =3D "yes" ; then - echo "CONFIG_VIRTFS=3Dy" >> $config_host_mak -fi if test "$vhost_scsi" =3D "yes" ; then echo "CONFIG_VHOST_SCSI=3Dy" >> $config_host_mak fi @@ -6582,7 +6561,7 @@ NINJA=3D$ninja $meson setup \ -Dcurl=3D$curl -Dglusterfs=3D$glusterfs -Dbzip2=3D$bzip2 -Dlibiscs= i=3D$libiscsi \ -Dlibnfs=3D$libnfs -Diconv=3D$iconv -Dcurses=3D$curses -Dlibudev= =3D$libudev\ -Dlibssh=3D$libssh -Drbd=3D$rbd -Dlzo=3D$lzo -Dsnappy=3D$snappy -D= lzfse=3D$lzfse \ - -Dzstd=3D$zstd -Dseccomp=3D$seccomp \ + -Dzstd=3D$zstd -Dseccomp=3D$seccomp -Dvirtfs=3D$virtfs \ -Ddocs=3D$docs -Dsphinx_build=3D$sphinx_build -Dinstall_blobs=3D$b= lobs \ -Dvhost_user_blk_server=3D$vhost_user_blk_server \ -Dfuse=3D$fuse -Dfuse_lseek=3D$fuse_lseek \ diff --git a/meson.build b/meson.build index a0132730d7..08d3586df5 100644 --- a/meson.build +++ b/meson.build @@ -959,6 +959,25 @@ endif # config-host.h # ################# =20 +have_virtfs =3D (targetos =3D=3D 'linux' and + have_system and + libattr.found() and + libcap_ng.found()) + +if get_option('virtfs').enabled() + if not have_virtfs + if targetos !=3D 'linux' + error('virtio-9p (virtfs) requires Linux') + elif not libcap_ng.found() or not libattr.found() + error('virtio-9p (virtfs) requires libcap-ng-devel and libattr-devel= ') + elif not have_system + error('virtio-9p (virtfs) needs system emulation support') + endif + endif +elif get_option('virtfs').disabled() + have_virtfs =3D false +endif + config_host_data.set_quoted('CONFIG_BINDIR', get_option('prefix') / get_op= tion('bindir')) config_host_data.set_quoted('CONFIG_PREFIX', get_option('prefix')) config_host_data.set_quoted('CONFIG_QEMU_CONFDIR', get_option('prefix') / = qemu_confdir) @@ -1001,6 +1020,7 @@ config_host_data.set('CONFIG_VNC', vnc.found()) config_host_data.set('CONFIG_VNC_JPEG', jpeg.found()) config_host_data.set('CONFIG_VNC_PNG', png.found()) config_host_data.set('CONFIG_VNC_SASL', sasl.found()) +config_host_data.set('CONFIG_VIRTFS', have_virtfs) config_host_data.set('CONFIG_XKBCOMMON', xkbcommon.found()) config_host_data.set('CONFIG_KEYUTILS', keyutils.found()) config_host_data.set('CONFIG_GETTID', has_gettid) @@ -1099,7 +1119,7 @@ host_kconfig =3D \ ('CONFIG_VHOST_USER' in config_host ? ['CONFIG_VHOST_USER=3Dy'] : []) + \ ('CONFIG_VHOST_VDPA' in config_host ? ['CONFIG_VHOST_VDPA=3Dy'] : []) + \ ('CONFIG_VHOST_KERNEL' in config_host ? ['CONFIG_VHOST_KERNEL=3Dy'] : []= ) + \ - ('CONFIG_VIRTFS' in config_host ? ['CONFIG_VIRTFS=3Dy'] : []) + \ + (have_virtfs ? ['CONFIG_VIRTFS=3Dy'] : []) + \ ('CONFIG_LINUX' in config_host ? ['CONFIG_LINUX=3Dy'] : []) + \ ('CONFIG_PVRDMA' in config_host ? ['CONFIG_PVRDMA=3Dy'] : []) =20 @@ -2287,7 +2307,7 @@ summary_info +=3D {'mingw32 support': targetos =3D= =3D 'windows'} 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 {'VirtFS support': have_virtfs} summary_info +=3D {'build virtiofs daemon': have_virtiofsd} summary_info +=3D {'Multipath support': mpathpersist.found()} summary_info +=3D {'VNC support': vnc.found()} diff --git a/meson_options.txt b/meson_options.txt index 1854a9639f..59a8a50e5b 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -90,10 +90,6 @@ 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)') -option('vhost_user_blk_server', type: 'feature', value: 'auto', - description: 'build vhost-user-blk server') option('zstd', type : 'feature', value : 'auto', description: 'zstd compression support') option('fuse', type: 'feature', value: 'auto', @@ -101,6 +97,13 @@ option('fuse', type: 'feature', value: 'auto', option('fuse_lseek', type : 'feature', value : 'auto', description: 'SEEK_HOLE/SEEK_DATA support for FUSE exports') =20 +option('vhost_user_blk_server', type: 'feature', value: 'auto', + description: 'build vhost-user-blk server') +option('virtfs', type: 'feature', value: 'auto', + description: 'virtio-9p support') +option('virtiofsd', type: 'feature', value: 'auto', + description: 'build virtiofs daemon (virtiofsd)') + option('capstone', type: 'combo', value: 'auto', choices: ['disabled', 'enabled', 'auto', 'system', 'internal'], description: 'Whether and how to find the capstone library') --=20 2.29.2