virtio: fix for rc2

Looks like the constant stream of additions of vhost-user devices is a
 problem for some people who are concerned about external connections
 from qemu. A per-device flag seems like an overkill, but a single
 configure flag seems like a sane way to support that, and it looks like
 we need to do it before the release.
 
 Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
 -----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJZgx3VAAoJECgfDbjSjVRpxUAH/A2ygeZWY/agnIPN0lF0au35
 0sYRyQ5TfM7IGMnR4OpCZCT0q/vZ7bOc9KWfl5u95WEgnOQa2la9U43T+jR+CvN1
 3dzAwtHEsUr/Y8sNVwZd0hy+EKN+saL13EBC64BGge7TmFWsOSRwE1CB12VgcNNG
 Qx4LlWNA28Vy+pxcgQNGWOsH5oQpiDiEDxpfNcgLGYKcKtbjpveblWlE4iPRUOoq
 mJk/tzcBiA/tqZT15VpVi9z+Zy2I06z5wzKjZjOotKjSGCajN6ZUK7lbJ327WwCM
 xi3VzHrwrqmtOQF++z/YJ0CRKLiHhKSWv/nY12NaqqgmyT0GRHnKzY8oubNVlxE=
 =pa4T
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging

virtio: fix for rc2

Looks like the constant stream of additions of vhost-user devices is a
problem for some people who are concerned about external connections
from qemu. A per-device flag seems like an overkill, but a single
configure flag seems like a sane way to support that, and it looks like
we need to do it before the release.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

# gpg: Signature made Thu 03 Aug 2017 13:57:57 BST
# gpg:                using RSA key 0x281F0DB8D28D5469
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>"
# gpg:                 aka "Michael S. Tsirkin <mst@redhat.com>"
# Primary key fingerprint: 0270 606B 6F3C DF3D 0B17  0970 C350 3912 AFBE 8E67
#      Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA  8A0D 281F 0DB8 D28D 5469

* remotes/mst/tags/for_upstream:
  build-sys: add --disable-vhost-user

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
master
Peter Maydell 2017-08-04 11:51:50 +01:00
commit 8377e9f609
5 changed files with 33 additions and 9 deletions

28
configure vendored
View File

@ -306,6 +306,7 @@ tcg="yes"
vhost_net="no"
vhost_scsi="no"
vhost_vsock="no"
vhost_user=""
kvm="no"
hax="no"
rdma=""
@ -1282,6 +1283,14 @@ for opt do
;;
--enable-vxhs) vxhs="yes"
;;
--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
;;
*)
echo "ERROR: unknown option $opt"
echo "Try '$0 --help' for more information"
@ -1290,6 +1299,14 @@ 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"
@ -1518,6 +1535,7 @@ disabled with --disable-FEATURE, default is enabled if available:
tools build qemu-io, qemu-nbd and qemu-image tools
vxhs Veritas HyperScale vDisk backend support
crypto-afalg Linux AF_ALG crypto backend driver
vhost-user vhost-user support
NOTE: The object files are built at the place where configure is launched
EOF
@ -5348,6 +5366,7 @@ echo "libcap-ng support $cap_ng"
echo "vhost-net support $vhost_net"
echo "vhost-scsi support $vhost_scsi"
echo "vhost-vsock support $vhost_vsock"
echo "vhost-user support $vhost_user"
echo "Trace backends $trace_backends"
if have_backend "simple"; then
echo "Trace output file $trace_file-<pid>"
@ -5757,12 +5776,15 @@ fi
if test "$vhost_scsi" = "yes" ; then
echo "CONFIG_VHOST_SCSI=y" >> $config_host_mak
fi
if test "$vhost_net" = "yes" ; then
if test "$vhost_net" = "yes" -a "$vhost_user" = "yes"; then
echo "CONFIG_VHOST_NET_USED=y" >> $config_host_mak
fi
if test "$vhost_vsock" = "yes" ; then
echo "CONFIG_VHOST_VSOCK=y" >> $config_host_mak
fi
if test "$vhost_user" = "yes" ; then
echo "CONFIG_VHOST_USER=y" >> $config_host_mak
fi
if test "$blobs" = "yes" ; then
echo "INSTALL_BLOBS=yes" >> $config_host_mak
fi
@ -6358,7 +6380,9 @@ 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
echo "CONFIG_VHOST_NET_TEST_$target_name=y" >> $config_host_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

View File

@ -43,4 +43,4 @@ CONFIG_VGA=y
CONFIG_VGA_PCI=y
CONFIG_IVSHMEM_DEVICE=$(CONFIG_IVSHMEM)
CONFIG_ROCKER=y
CONFIG_VHOST_USER_SCSI=$(CONFIG_LINUX)
CONFIG_VHOST_USER_SCSI=$(and $(CONFIG_VHOST_USER),$(CONFIG_LINUX))

View File

@ -1,6 +1,6 @@
CONFIG_PCI=y
CONFIG_VIRTIO_PCI=y
CONFIG_VHOST_USER_SCSI=$(CONFIG_LINUX)
CONFIG_VHOST_USER_SCSI=$(and $(CONFIG_VHOST_USER),$(CONFIG_LINUX))
CONFIG_VIRTIO=y
CONFIG_SCLPCONSOLE=y
CONFIG_TERMINAL3270=y

View File

@ -2135,7 +2135,7 @@ static const TypeInfo vhost_scsi_pci_info = {
};
#endif
#ifdef CONFIG_LINUX
#if defined(CONFIG_VHOST_USER) && defined(CONFIG_LINUX)
/* vhost-user-scsi-pci */
static Property vhost_user_scsi_pci_properties[] = {
DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors,
@ -2665,7 +2665,7 @@ static void virtio_pci_register_types(void)
#ifdef CONFIG_VHOST_SCSI
type_register_static(&vhost_scsi_pci_info);
#endif
#ifdef CONFIG_LINUX
#if defined(CONFIG_VHOST_USER) && defined(CONFIG_LINUX)
type_register_static(&vhost_user_scsi_pci_info);
#endif
#ifdef CONFIG_VHOST_VSOCK

View File

@ -255,9 +255,9 @@ check-qtest-i386-y += tests/pc-cpu-test$(EXESUF)
check-qtest-i386-y += tests/q35-test$(EXESUF)
check-qtest-i386-y += tests/vmgenid-test$(EXESUF)
gcov-files-i386-y += hw/pci-host/q35.c
check-qtest-i386-$(CONFIG_VHOST_NET_TEST_i386) += tests/vhost-user-test$(EXESUF)
ifeq ($(CONFIG_VHOST_NET_TEST_i386),)
check-qtest-x86_64-$(CONFIG_VHOST_NET_TEST_x86_64) += tests/vhost-user-test$(EXESUF)
check-qtest-i386-$(CONFIG_VHOST_USER_NET_TEST_i386) += tests/vhost-user-test$(EXESUF)
ifeq ($(CONFIG_VHOST_USER_NET_TEST_i386),)
check-qtest-x86_64-$(CONFIG_VHOST_USER_NET_TEST_x86_64) += tests/vhost-user-test$(EXESUF)
endif
check-qtest-i386-$(CONFIG_SLIRP) += tests/test-netfilter$(EXESUF)
check-qtest-i386-y += tests/test-filter-mirror$(EXESUF)