multiprocess: move feature to meson_options.txt

While at it, improve the description of the feature in the summary and
help message.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2021-02-17 16:24:25 +01:00
parent efce01bcb6
commit 106ad1f9c5
3 changed files with 14 additions and 11 deletions

14
configure vendored
View File

@ -463,7 +463,7 @@ skip_meson=no
gettext="auto"
fuse="auto"
fuse_lseek="auto"
multiprocess="no"
multiprocess="auto"
malloc_trim="auto"
@ -798,7 +798,6 @@ Linux)
linux="yes"
linux_user="yes"
vhost_user=${default_feature:-yes}
multiprocess=${default_feature:-yes}
;;
esac
@ -1558,9 +1557,9 @@ for opt do
;;
--disable-fuse-lseek) fuse_lseek="disabled"
;;
--enable-multiprocess) multiprocess="yes"
--enable-multiprocess) multiprocess="enabled"
;;
--disable-multiprocess) multiprocess="no"
--disable-multiprocess) multiprocess="disabled"
;;
*)
echo "ERROR: unknown option $opt"
@ -1914,7 +1913,7 @@ disabled with --disable-FEATURE, default is enabled if available
libdaxctl libdaxctl support
fuse FUSE block device export
fuse-lseek SEEK_HOLE/SEEK_DATA support for FUSE exports
multiprocess Multiprocess QEMU support
multiprocess Out of process device emulation support
NOTE: The object files are built at the place where configure is launched
EOF
@ -6089,9 +6088,6 @@ fi
if test "$have_mlockall" = "yes" ; then
echo "HAVE_MLOCKALL=y" >> $config_host_mak
fi
if test "$multiprocess" = "yes" ; then
echo "CONFIG_MULTIPROCESS_ALLOWED=y" >> $config_host_mak
fi
if test "$fuzzing" = "yes" ; then
# If LIB_FUZZING_ENGINE is set, assume we are running on OSS-Fuzz, and the
# needed CFLAGS have already been provided
@ -6434,7 +6430,7 @@ NINJA=$ninja $meson setup \
-Dzstd=$zstd -Dseccomp=$seccomp -Dvirtfs=$virtfs -Dcap_ng=$cap_ng \
-Dattr=$attr -Ddefault_devices=$default_devices \
-Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \
-Dvhost_user_blk_server=$vhost_user_blk_server \
-Dvhost_user_blk_server=$vhost_user_blk_server -Dmultiprocess=$multiprocess \
-Dfuse=$fuse -Dfuse_lseek=$fuse_lseek -Dguest_agent_msi=$guest_agent_msi \
$(if test "$default_features" = no; then echo "-Dauto_features=disabled"; fi) \
-Dtcg_interpreter=$tcg_interpreter \

View File

@ -157,6 +157,11 @@ if targetos != 'linux' and get_option('mpath').enabled()
error('Multipath is supported only on Linux')
endif
if targetos != 'linux' and get_option('multiprocess').enabled()
error('Multiprocess QEMU is supported only on Linux')
endif
multiprocess_allowed = targetos == 'linux' and not get_option('multiprocess').disabled()
m = cc.find_library('m', required: false)
util = cc.find_library('util', required: false)
winmm = []
@ -1228,7 +1233,7 @@ host_kconfig = \
(have_virtfs ? ['CONFIG_VIRTFS=y'] : []) + \
('CONFIG_LINUX' in config_host ? ['CONFIG_LINUX=y'] : []) + \
('CONFIG_PVRDMA' in config_host ? ['CONFIG_PVRDMA=y'] : []) + \
('CONFIG_MULTIPROCESS_ALLOWED' in config_host ? ['CONFIG_MULTIPROCESS_ALLOWED=y'] : [])
(multiprocess_allowed ? ['CONFIG_MULTIPROCESS_ALLOWED=y'] : [])
ignored = [ 'TARGET_XML_FILES', 'TARGET_ABI_DIR', 'TARGET_ARCH' ]
@ -2538,6 +2543,7 @@ endif
summary_info += {'target list': ' '.join(target_dirs)}
if have_system
summary_info += {'default devices': get_option('default_devices')}
summary_info += {'out of process emulation': multiprocess_allowed}
endif
summary(summary_info, bool_yn: true, section: 'Targets and accelerators')
@ -2658,7 +2664,6 @@ summary_info += {'libpmem support': config_host.has_key('CONFIG_LIBPMEM')}
summary_info += {'libdaxctl support': config_host.has_key('CONFIG_LIBDAXCTL')}
summary_info += {'libudev': libudev.found()}
summary_info += {'FUSE lseek': fuse_lseek.found()}
summary_info += {'Multiprocess QEMU': config_host.has_key('CONFIG_MULTIPROCESS_ALLOWED')}
summary(summary_info, bool_yn: true, section: 'Dependencies')
if not supported_cpus.contains(cpu)

View File

@ -45,6 +45,8 @@ option('cfi', type: 'boolean', value: 'false',
description: 'Control-Flow Integrity (CFI)')
option('cfi_debug', type: 'boolean', value: 'false',
description: 'Verbose errors in case of CFI violation')
option('multiprocess', type: 'feature', value: 'auto',
description: 'Out of process device emulation support')
option('attr', type : 'feature', value : 'auto',
description: 'attr/xattr support')