qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>, qemu-devel@nongnu.org
Cc: Michael Roth <mdroth@linux.vnet.ibm.com>,
	Markus Armbruster <armbru@redhat.com>,
	Eduardo Habkost <ehabkost@redhat.com>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [PATCH v4 1/1] qapi: Restrict code generated for user-mode
Date: Fri, 2 Oct 2020 10:50:11 +0200	[thread overview]
Message-ID: <17772b79-07db-98ff-96c5-01a9ac1cbcca@redhat.com> (raw)
In-Reply-To: <20201002073621.1653924-2-philmd@redhat.com>

On 02/10/20 09:36, Philippe Mathieu-Daudé wrote:
> A lot of QAPI generated code is never used by user-mode.
> 
> Split out qapi_system_modules and qapi_system_or_tools_modules
> from the qapi_all_modules array. We now have 4 groups:
> - always used
> - only used by system-mode
> - not used by user-mode
> - not used by tools
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  qapi/meson.build | 51 ++++++++++++++++++++++++++++++++++--------------
>  1 file changed, 36 insertions(+), 15 deletions(-)
> 
> diff --git a/qapi/meson.build b/qapi/meson.build
> index 7c4a89a882..10cf01ef65 100644
> --- a/qapi/meson.build
> +++ b/qapi/meson.build
> @@ -14,39 +14,60 @@ util_ss.add(files(
>  ))
>  
>  qapi_all_modules = [
> +  'common',
> +  'introspect',
> +  'misc',
> +]
> +
> +qapi_system_modules = [
>    'acpi',
>    'audio',
> +  'dump',
> +  'machine-target',
> +  'migration',
> +  'misc-target',
> +  'net',
> +  'pci',
> +  'rdma',
> +  'rocker',
> +  'tpm',
> +  'trace',
> +]
> +
> +qapi_system_or_user_modules = [
> +  'machine', # X86CPUFeatureWordInfo
> +  'qdev',
> +]
> +
> +qapi_system_or_tools_modules = [
>    'authz',
>    'block-core',
>    'block',
>    'char',
> -  'common',
>    'control',
>    'crypto',
> -  'dump',
>    'error',
> -  'introspect',
>    'job',
> -  'machine',
> -  'machine-target',
> -  'migration',
> -  'misc',
> -  'misc-target',
> -  'net',
>    'pragma',
> -  'qdev',
> -  'pci',
>    'qom',
> -  'rdma',
> -  'rocker',
>    'run-state',
>    'sockets',
> -  'tpm',
> -  'trace',
>    'transaction',
>    'ui',
>  ]
>  
> +if have_system
> +  qapi_all_modules += qapi_system_modules
> +endif
> +
> +if have_system or have_user
> +  qapi_all_modules += qapi_system_or_user_modules
> +endif
> +
> +if have_system or have_tools
> +  qapi_all_modules += qapi_system_or_tools_modules
> +endif
> +
>  qapi_storage_daemon_modules = [
>    'block-core',
>    'char',
> 

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>



  reply	other threads:[~2020-10-02  8:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-02  7:36 [PATCH v4 0/1] user-mode: Prune build dependencies (part 3) Philippe Mathieu-Daudé
2020-10-02  7:36 ` [PATCH v4 1/1] qapi: Restrict code generated for user-mode Philippe Mathieu-Daudé
2020-10-02  8:50   ` Paolo Bonzini [this message]
2020-10-02  9:16   ` Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17772b79-07db-98ff-96c5-01a9ac1cbcca@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=armbru@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).