Re: [Qemu-devel] [RFC PATCH 21/34] vmbus: build configuration

2018-02-08 Thread Paolo Bonzini
On 07/02/2018 20:30, Roman Kagan wrote:
> On Wed, Feb 07, 2018 at 12:04:01PM +0100, Paolo Bonzini wrote:
>> On 06/02/2018 21:30, Roman Kagan wrote:
>>> From: Evgeny Yakovlev 
>>>
>>> Add option to configure and makefiles to enable building vmbus support
>>> (default to "on" on Linux and "off" otherwise).
>>
>> Maybe default to on if KVM is supported?  Could it just be
>>
>> CONFIG_VMBUS=$(CONFIG_KVM)
>>
>> in default-configs/ instead of having a configure option?
> 
> Then there won't be an obvious way to turn it off, will there be?

Distros can and do patch default-configs/.  It's not very obvious, I
agree, but then it's what we suggest to do in order to turn off all
those old, hardly maintained ISA devices.  So to some extent it's a
documentation problem.

Paolo



Re: [Qemu-devel] [RFC PATCH 21/34] vmbus: build configuration

2018-02-07 Thread Roman Kagan
On Wed, Feb 07, 2018 at 12:04:01PM +0100, Paolo Bonzini wrote:
> On 06/02/2018 21:30, Roman Kagan wrote:
> > From: Evgeny Yakovlev 
> > 
> > Add option to configure and makefiles to enable building vmbus support
> > (default to "on" on Linux and "off" otherwise).
> 
> Maybe default to on if KVM is supported?  Could it just be
> 
> CONFIG_VMBUS=$(CONFIG_KVM)
> 
> in default-configs/ instead of having a configure option?

Then there won't be an obvious way to turn it off, will there be?

> > Signed-off-by: Roman Kagan 
> 
> Missing Evgeny's SoB.

Ouch.  Will fix when submitting for inclusion.

Thanks,
Roman.



Re: [Qemu-devel] [RFC PATCH 21/34] vmbus: build configuration

2018-02-07 Thread Paolo Bonzini
On 06/02/2018 21:30, Roman Kagan wrote:
> From: Evgeny Yakovlev 
> 
> Add option to configure and makefiles to enable building vmbus support
> (default to "on" on Linux and "off" otherwise).

Maybe default to on if KVM is supported?  Could it just be

CONFIG_VMBUS=$(CONFIG_KVM)

in default-configs/ instead of having a configure option?

> Signed-off-by: Roman Kagan 

Missing Evgeny's SoB.

Paolo

> ---
>  configure| 11 +++
>  hw/Makefile.objs |  1 +
>  2 files changed, 12 insertions(+)
> 
> diff --git a/configure b/configure
> index 302fdc92ff..5a0ca5dc4a 100755
> --- a/configure
> +++ b/configure
> @@ -436,6 +436,7 @@ jemalloc="no"
>  replication="yes"
>  vxhs=""
>  libxml2=""
> +vmbus="no"
>  
>  supported_cpu="no"
>  supported_os="no"
> @@ -804,6 +805,7 @@ Linux)
>vhost_net="yes"
>vhost_scsi="yes"
>vhost_vsock="yes"
> +  vmbus="yes"
>QEMU_INCLUDES="-I\$(SRC_PATH)/linux-headers -I$(pwd)/linux-headers 
> $QEMU_INCLUDES"
>supported_os="yes"
>  ;;
> @@ -1341,6 +1343,10 @@ for opt do
>;;
>--disable-git-update) git_update=no
>;;
> +  --disable-vmbus) vmbus="no"
> +  ;;
> +  --enable-vmbus) vmbus="yes"
> +  ;;
>*)
>echo "ERROR: unknown option $opt"
>echo "Try '$0 --help' for more information"
> @@ -1592,6 +1598,7 @@ disabled with --disable-FEATURE, default is enabled if 
> available:
>crypto-afalgLinux AF_ALG crypto backend driver
>vhost-user  vhost-user support
>capstonecapstone disassembler support
> +  vmbus   Hyper-V VMBus devices support
>  
>  NOTE: The object files are built at the place where configure is launched
>  EOF
> @@ -5657,6 +5664,7 @@ echo "avx2 optimization $avx2_opt"
>  echo "replication support $replication"
>  echo "VxHS block device $vxhs"
>  echo "capstone  $capstone"
> +echo "vmbus support $vmbus"
>  
>  if test "$sdl_too_old" = "yes"; then
>  echo "-> Your SDL version is too old - please upgrade to have SDL support"
> @@ -6347,6 +6355,9 @@ fi
>  if test "$have_static_assert" = "yes" ; then
>echo "CONFIG_STATIC_ASSERT=y" >> $config_host_mak
>  fi
> +if test "$vmbus" = "yes" ; then
> +  echo "CONFIG_VMBUS=y" >> $config_host_mak
> +fi
>  
>  if test "$have_utmpx" = "yes" ; then
>echo "HAVE_UTMPX=y" >> $config_host_mak
> diff --git a/hw/Makefile.objs b/hw/Makefile.objs
> index cf4cb2010b..c12fc0cc22 100644
> --- a/hw/Makefile.objs
> +++ b/hw/Makefile.objs
> @@ -34,6 +34,7 @@ devices-dirs-$(CONFIG_SOFTMMU) += watchdog/
>  devices-dirs-$(CONFIG_SOFTMMU) += xen/
>  devices-dirs-$(CONFIG_MEM_HOTPLUG) += mem/
>  devices-dirs-$(CONFIG_SOFTMMU) += smbios/
> +devices-dirs-$(CONFIG_VMBUS) += vmbus/
>  devices-dirs-y += core/
>  common-obj-y += $(devices-dirs-y)
>  obj-y += $(devices-dirs-y)
>