[PATCH] build-sys: build vhost-user-gpu only if CONFIG_TOOLS

Paolo Bonzini posted 1 patch 4 years, 4 months ago
Test asan failed
Test checkpatch passed
Test FreeBSD failed
Test docker-mingw@fedora failed
Test docker-clang@ubuntu failed
Test docker-quick@centos7 failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/1576074210-52834-1-git-send-email-pbonzini@redhat.com
Makefile | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
[PATCH] build-sys: build vhost-user-gpu only if CONFIG_TOOLS
Posted by Paolo Bonzini 4 years, 4 months ago
From: Marc-André Lureau <marcandre.lureau@redhat.com>

vhost-user-gpu is always built and installed, but it is not part of the emulator
proper.  Cut it if --disable-tools is specified.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 Makefile | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index 53823c2..8d921c6 100644
--- a/Makefile
+++ b/Makefile
@@ -321,14 +321,10 @@ HELPERS-y =
 
 HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) = qemu-bridge-helper$(EXESUF)
 
-ifdef CONFIG_LINUX
-ifdef CONFIG_VIRGL
-ifdef CONFIG_GBM
+ifeq ($(CONFIG_LINUX)$(CONFIG_VIRGL)$(CONFIG_GBM)$(CONFIG_TOOLS),yyyy)
 HELPERS-y += vhost-user-gpu$(EXESUF)
 vhost-user-json-y += contrib/vhost-user-gpu/50-qemu-gpu.json
 endif
-endif
-endif
 
 # Sphinx does not allow building manuals into the same directory as
 # the source files, so if we're doing an in-tree QEMU build we must
-- 
1.8.3.1


Re: [PATCH] build-sys: build vhost-user-gpu only if CONFIG_TOOLS
Posted by Daniel P. Berrangé 4 years, 4 months ago
On Wed, Dec 11, 2019 at 03:23:22PM +0100, Paolo Bonzini wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> vhost-user-gpu is always built and installed, but it is not part of the emulator
> proper.  Cut it if --disable-tools is specified.

I don't feel like this is something that people would really
consider part of "tools" either.  This is something you'd
only ever use in conjunction with the emulators, so I don't
think controlling it with --disable-tools is appropriate.

A new --(enable|disable)-vhost-backends  arg looks more
desirable to me. Disabling the system emulators should
automatically imply --disable-vhost-backends by default
too

> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  Makefile | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 53823c2..8d921c6 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -321,14 +321,10 @@ HELPERS-y =
>  
>  HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) = qemu-bridge-helper$(EXESUF)
>  
> -ifdef CONFIG_LINUX
> -ifdef CONFIG_VIRGL
> -ifdef CONFIG_GBM
> +ifeq ($(CONFIG_LINUX)$(CONFIG_VIRGL)$(CONFIG_GBM)$(CONFIG_TOOLS),yyyy)
>  HELPERS-y += vhost-user-gpu$(EXESUF)
>  vhost-user-json-y += contrib/vhost-user-gpu/50-qemu-gpu.json
>  endif
> -endif
> -endif
>  
>  # Sphinx does not allow building manuals into the same directory as
>  # the source files, so if we're doing an in-tree QEMU build we must
> -- 
> 1.8.3.1
> 
> 

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


Re: [PATCH] build-sys: build vhost-user-gpu only if CONFIG_TOOLS
Posted by Dr. David Alan Gilbert 4 years, 4 months ago
* Daniel P. Berrangé (berrange@redhat.com) wrote:
> On Wed, Dec 11, 2019 at 03:23:22PM +0100, Paolo Bonzini wrote:
> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> > 
> > vhost-user-gpu is always built and installed, but it is not part of the emulator
> > proper.  Cut it if --disable-tools is specified.
> 
> I don't feel like this is something that people would really
> consider part of "tools" either.  This is something you'd
> only ever use in conjunction with the emulators, so I don't
> think controlling it with --disable-tools is appropriate.
> 
> A new --(enable|disable)-vhost-backends  arg looks more
> desirable to me. Disabling the system emulators should
> automatically imply --disable-vhost-backends by default
> too

It feels to me that vhost-backends are a subset of tools.

Dave

> > 
> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> > ---
> >  Makefile | 6 +-----
> >  1 file changed, 1 insertion(+), 5 deletions(-)
> > 
> > diff --git a/Makefile b/Makefile
> > index 53823c2..8d921c6 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -321,14 +321,10 @@ HELPERS-y =
> >  
> >  HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) = qemu-bridge-helper$(EXESUF)
> >  
> > -ifdef CONFIG_LINUX
> > -ifdef CONFIG_VIRGL
> > -ifdef CONFIG_GBM
> > +ifeq ($(CONFIG_LINUX)$(CONFIG_VIRGL)$(CONFIG_GBM)$(CONFIG_TOOLS),yyyy)
> >  HELPERS-y += vhost-user-gpu$(EXESUF)
> >  vhost-user-json-y += contrib/vhost-user-gpu/50-qemu-gpu.json
> >  endif
> > -endif
> > -endif
> >  
> >  # Sphinx does not allow building manuals into the same directory as
> >  # the source files, so if we're doing an in-tree QEMU build we must
> > -- 
> > 1.8.3.1
> > 
> > 
> 
> Regards,
> Daniel
> -- 
> |: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org         -o-            https://fstop138.berrange.com :|
> |: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
> 
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK


Re: [PATCH] build-sys: build vhost-user-gpu only if CONFIG_TOOLS
Posted by Thomas Huth 4 years, 4 months ago
On 11/12/2019 15.23, Paolo Bonzini wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> vhost-user-gpu is always built and installed, but it is not part of the emulator
> proper.  Cut it if --disable-tools is specified.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  Makefile | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 53823c2..8d921c6 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -321,14 +321,10 @@ HELPERS-y =
>  
>  HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) = qemu-bridge-helper$(EXESUF)
>  
> -ifdef CONFIG_LINUX
> -ifdef CONFIG_VIRGL
> -ifdef CONFIG_GBM
> +ifeq ($(CONFIG_LINUX)$(CONFIG_VIRGL)$(CONFIG_GBM)$(CONFIG_TOOLS),yyyy)
>  HELPERS-y += vhost-user-gpu$(EXESUF)
>  vhost-user-json-y += contrib/vhost-user-gpu/50-qemu-gpu.json
>  endif
> -endif
> -endif

Reviewed-by: Thomas Huth <thuth@redhat.com>