summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure102
1 files changed, 64 insertions, 38 deletions
diff --git a/configure b/configure
index 540bee19ba..cefeb8fcce 100755
--- a/configure
+++ b/configure
@@ -368,10 +368,10 @@ libattr=""
xfs=""
tcg="yes"
membarrier=""
-vhost_net="no"
-vhost_crypto="no"
-vhost_scsi="no"
-vhost_vsock="no"
+vhost_net=""
+vhost_crypto=""
+vhost_scsi=""
+vhost_vsock=""
vhost_user=""
kvm="no"
hax="no"
@@ -783,6 +783,7 @@ case $targetos in
MINGW32*)
mingw32="yes"
hax="yes"
+ vhost_user="no"
audio_possible_drivers="dsound sdl"
if check_include dsound.h; then
audio_drv_list="dsound"
@@ -884,10 +885,6 @@ Linux)
linux="yes"
linux_user="yes"
kvm="yes"
- vhost_net="yes"
- vhost_crypto="yes"
- vhost_scsi="yes"
- vhost_vsock="yes"
QEMU_INCLUDES="-I\$(SRC_PATH)/linux-headers -I$PWD/linux-headers $QEMU_INCLUDES"
supported_os="yes"
libudev="yes"
@@ -1263,11 +1260,7 @@ for opt do
;;
--disable-vhost-crypto) vhost_crypto="no"
;;
- --enable-vhost-crypto)
- vhost_crypto="yes"
- if test "$mingw32" = "yes"; then
- error_exit "vhost-crypto isn't available on win32"
- fi
+ --enable-vhost-crypto) vhost_crypto="yes"
;;
--disable-vhost-scsi) vhost_scsi="no"
;;
@@ -1476,11 +1469,11 @@ for opt do
;;
--disable-vhost-user) vhost_user="no"
;;
- --enable-vhost-user)
- vhost_user="yes"
- if test "$mingw32" = "yes"; then
- error_exit "vhost-user isn't available on win32"
- fi
+ --enable-vhost-user) vhost_user="yes"
+ ;;
+ --disable-vhost-kernel) vhost_kernel="no"
+ ;;
+ --enable-vhost-kernel) vhost_kernel="yes"
;;
--disable-capstone) capstone="no"
;;
@@ -1512,14 +1505,6 @@ for opt do
esac
done
-if test "$vhost_user" = ""; then
- if test "$mingw32" = "yes"; then
- vhost_user="no"
- else
- vhost_user="yes"
- fi
-fi
-
case "$cpu" in
ppc)
CPU_CFLAGS="-m32"
@@ -1743,8 +1728,12 @@ disabled with --disable-FEATURE, default is enabled if available:
linux-aio Linux AIO support
cap-ng libcap-ng support
attr attr and xattr support
- vhost-net vhost-net acceleration support
- vhost-crypto vhost-crypto acceleration support
+ vhost-net vhost-net kernel acceleration support
+ vhost-vsock virtio sockets device support
+ vhost-scsi vhost-scsi kernel target support
+ vhost-crypto vhost-user-crypto backend support
+ vhost-kernel vhost kernel backend support
+ vhost-user vhost-user backend support
spice spice
rbd rados block device (rbd)
libiscsi iscsi support
@@ -1770,7 +1759,6 @@ disabled with --disable-FEATURE, default is enabled if available:
jemalloc jemalloc support
avx2 AVX2 optimization support
replication replication support
- vhost-vsock virtio sockets device support
opengl opengl support
virglrenderer virgl rendering support
xfsctl xfsctl support
@@ -1787,7 +1775,6 @@ disabled with --disable-FEATURE, default is enabled if available:
parallels parallels image format support
sheepdog sheepdog block driver support
crypto-afalg Linux AF_ALG crypto backend driver
- vhost-user vhost-user support
capstone capstone disassembler support
debug-mutex mutex debugging support
libpmem libpmem support
@@ -2177,6 +2164,45 @@ else
l2tpv3=no
fi
+#########################################
+# vhost interdependencies and host support
+
+# vhost backends
+test "$vhost_user" = "" && vhost_user=yes
+if test "$vhost_user" = "yes" && test "$mingw32" = "yes"; then
+ error_exit "vhost-user isn't available on win32"
+fi
+test "$vhost_kernel" = "" && vhost_kernel=$linux
+if test "$vhost_kernel" = "yes" && test "$linux" != "yes"; then
+ error_exit "vhost-kernel is only available on Linux"
+fi
+
+# vhost-kernel devices
+test "$vhost_scsi" = "" && vhost_scsi=$vhost_kernel
+if test "$vhost_scsi" = "yes" && test "$vhost_kernel" != "yes"; then
+ error_exit "--enable-vhost-scsi requires --enable-vhost-kernel"
+fi
+test "$vhost_vsock" = "" && vhost_vsock=$vhost_kernel
+if test "$vhost_vsock" = "yes" && test "$vhost_kernel" != "yes"; then
+ error_exit "--enable-vhost-vsock requires --enable-vhost-kernel"
+fi
+
+# vhost-user backends
+test "$vhost_net_user" = "" && vhost_net_user=$vhost_user
+if test "$vhost_net_user" = "yes" && test "$vhost_user" = "no"; then
+ error_exit "--enable-vhost-net-user requires --enable-vhost-user"
+fi
+test "$vhost_crypto" = "" && vhost_crypto=$vhost_user
+if test "$vhost_crypto" = "yes" && test "$vhost_user" = "no"; then
+ error_exit "--enable-vhost-crypto requires --enable-vhost-user"
+fi
+
+# OR the vhost-kernel and vhost-user values for simplicity
+if test "$vhost_net" = ""; then
+ test "$vhost_net_user" = "yes" && vhost_net=yes
+ test "$vhost_kernel" = "yes" && vhost_net=yes
+fi
+
##########################################
# MinGW / Mingw-w64 localtime_r/gmtime_r check
@@ -6622,8 +6648,11 @@ fi
if test "$vhost_scsi" = "yes" ; then
echo "CONFIG_VHOST_SCSI=y" >> $config_host_mak
fi
-if test "$vhost_net" = "yes" && test "$vhost_user" = "yes"; then
- echo "CONFIG_VHOST_NET_USED=y" >> $config_host_mak
+if test "$vhost_net" = "yes" ; then
+ echo "CONFIG_VHOST_NET=y" >> $config_host_mak
+fi
+if test "$vhost_net_user" = "yes" ; then
+ echo "CONFIG_VHOST_NET_USER=y" >> $config_host_mak
fi
if test "$vhost_crypto" = "yes" ; then
echo "CONFIG_VHOST_CRYPTO=y" >> $config_host_mak
@@ -6631,6 +6660,9 @@ fi
if test "$vhost_vsock" = "yes" ; then
echo "CONFIG_VHOST_VSOCK=y" >> $config_host_mak
fi
+if test "$vhost_kernel" = "yes" ; then
+ echo "CONFIG_VHOST_KERNEL=y" >> $config_host_mak
+fi
if test "$vhost_user" = "yes" ; then
echo "CONFIG_VHOST_USER=y" >> $config_host_mak
fi
@@ -7401,12 +7433,6 @@ if supported_xen_target $target; then
fi
if supported_kvm_target $target; then
echo "CONFIG_KVM=y" >> $config_target_mak
- if test "$vhost_net" = "yes" ; then
- echo "CONFIG_VHOST_NET=y" >> $config_target_mak
- if test "$vhost_user" = "yes" ; then
- echo "CONFIG_VHOST_USER_NET_TEST_$target_name=y" >> $config_host_mak
- fi
- fi
fi
if supported_hax_target $target; then
echo "CONFIG_HAX=y" >> $config_target_mak