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: "Thomas Huth" <thuth@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	"Michael Roth" <michael.roth@amd.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Laurent Vivier" <laurent@vivier.eu>,
	"Claudio Fontana" <cfontana@suse.de>
Subject: Re: [PATCH v2 09/12] qapi/meson: Restrict qdev code to system-mode emulation
Date: Sat, 23 Jan 2021 19:10:55 +0100	[thread overview]
Message-ID: <fcb116d8-8701-90cc-fabd-85983740f74b@redhat.com> (raw)
In-Reply-To: <20210122204441.2145197-10-philmd@redhat.com>

On 22/01/21 21:44, Philippe Mathieu-Daudé wrote:
> Beside a CPU device, user-mode emulation doesn't access
> anything else from qdev subsystem.
> 
> Tools don't need anything from qdev.

I prefer to avoid stubs.  So if this patch can simply be dropped with no 
effects on 10-12, that's nicer for me.

Paolo

> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> Cc: Laurent Vivier <laurent@vivier.eu>
> Cc: Eduardo Habkost <ehabkost@redhat.com>
> ---
>   stubs/qdev.c      | 23 +++++++++++++++++++++++
>   MAINTAINERS       |  1 +
>   qapi/meson.build  |  6 +++++-
>   stubs/meson.build |  2 ++
>   4 files changed, 31 insertions(+), 1 deletion(-)
>   create mode 100644 stubs/qdev.c
> 
> diff --git a/stubs/qdev.c b/stubs/qdev.c
> new file mode 100644
> index 00000000000..92e61431344
> --- /dev/null
> +++ b/stubs/qdev.c
> @@ -0,0 +1,23 @@
> +/*
> + * QOM stubs
> + *
> + * Copyright (c) 2021 Red Hat, Inc.
> + *
> + * Author:
> + *   Philippe Mathieu-Daudé <philmd@redhat.com>
> + *
> + * SPDX-License-Identifier: GPL-2.0-or-later
> + *
> + * This work is licensed under the terms of the GNU GPL, version 2 or later.
> + * See the COPYING file in the top-level directory.
> + */
> +
> +#include "qemu/osdep.h"
> +#include "qapi/qapi-events-qdev.h"
> +
> +void qapi_event_send_device_deleted(bool has_device,
> +                                    const char *device,
> +                                    const char *path)
> +{
> +    /* Nothing to do. */
> +}
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 34359a99b8e..d2dd7c24228 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -2523,6 +2523,7 @@ F: qapi/qom.json
>   F: qapi/qdev.json
>   F: scripts/coccinelle/qom-parent-type.cocci
>   F: softmmu/qdev-monitor.c
> +F: stubs/qdev.c
>   F: qom/
>   F: tests/check-qom-interface.c
>   F: tests/check-qom-proplist.c
> diff --git a/qapi/meson.build b/qapi/meson.build
> index ab68e7900e4..2839871b478 100644
> --- a/qapi/meson.build
> +++ b/qapi/meson.build
> @@ -35,7 +35,6 @@
>     'misc-target',
>     'net',
>     'pragma',
> -  'qdev',
>     'pci',
>     'qom',
>     'rdma',
> @@ -49,6 +48,11 @@
>     'ui',
>     'yank',
>   ]
> +if have_system
> +  qapi_all_modules += [
> +    'qdev',
> +  ]
> +endif
>   
>   qapi_storage_daemon_modules = [
>     'block-core',
> diff --git a/stubs/meson.build b/stubs/meson.build
> index 1a656cd0704..a054d5877fb 100644
> --- a/stubs/meson.build
> +++ b/stubs/meson.build
> @@ -53,4 +53,6 @@
>   if have_system
>     stub_ss.add(files('semihost.c'))
>     stub_ss.add(files('xen-hw-stub.c'))
> +else
> +  stub_ss.add(files('qdev.c'))
>   endif
> 



  reply	other threads:[~2021-01-23 18:12 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-22 20:44 [PATCH v2 00/12] buildsys: Do not build various objects if not necessary Philippe Mathieu-Daudé
2021-01-22 20:44 ` [PATCH v2 01/12] configure: Only check for audio drivers if system-mode is selected Philippe Mathieu-Daudé
2021-01-25 14:52   ` Alex Bennée
2021-01-22 20:44 ` [PATCH v2 02/12] tests/meson: Only build softfloat objects if TCG " Philippe Mathieu-Daudé
2021-01-23 12:19   ` Claudio Fontana
2021-01-25 15:05   ` Alex Bennée
2021-01-22 20:44 ` [PATCH v2 03/12] pc-bios/meson: Only install EDK2 blob firmwares with system emulation Philippe Mathieu-Daudé
2021-01-22 20:44 ` [PATCH v2 04/12] meson: Do not build optional libraries by default Philippe Mathieu-Daudé
2021-01-22 20:44 ` [PATCH v2 05/12] meson: Restrict block subsystem processing Philippe Mathieu-Daudé
2021-01-25 12:15   ` Kevin Wolf
2021-01-25 18:51     ` Paolo Bonzini
2021-01-22 20:44 ` [PATCH v2 06/12] meson: Merge trace_events_subdirs array Philippe Mathieu-Daudé
2021-01-23 12:29   ` Claudio Fontana
2021-01-22 20:44 ` [PATCH v2 07/12] meson: Restrict some trace event directories to user/system emulation Philippe Mathieu-Daudé
2021-01-22 20:44 ` [PATCH v2 08/12] meson: Restrict emulation code Philippe Mathieu-Daudé
2021-01-25 15:09   ` Philippe Mathieu-Daudé
2021-01-25 15:12     ` Philippe Mathieu-Daudé
2021-01-22 20:44 ` [PATCH v2 09/12] qapi/meson: Restrict qdev code to system-mode emulation Philippe Mathieu-Daudé
2021-01-23 18:10   ` Paolo Bonzini [this message]
2021-01-24  0:32     ` Philippe Mathieu-Daudé
2021-01-26 15:46       ` Paolo Bonzini
2021-01-22 20:44 ` [PATCH v2 10/12] qapi/meson: Remove QMP from user-mode emulation Philippe Mathieu-Daudé
2021-01-22 20:44 ` [PATCH v2 11/12] qapi/meson: Restrict system-mode specific modules Philippe Mathieu-Daudé
2021-01-22 20:44 ` [PATCH v2 12/12] qapi/meson: Restrict UI module to system emulation and tools Philippe Mathieu-Daudé
2021-01-23 18:11 ` [PATCH v2 00/12] buildsys: Do not build various objects if not necessary Paolo Bonzini
2021-01-26 14:57 ` Alex Bennée
2021-01-26 15:28   ` Philippe Mathieu-Daudé
2021-01-26 16:09     ` Markus Armbruster
2021-01-26 19:38       ` Philippe Mathieu-Daudé
2021-01-27  8:42         ` Markus Armbruster
2021-01-29  8:22 ` Paolo Bonzini

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=fcb116d8-8701-90cc-fabd-85983740f74b@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=cfontana@suse.de \
    --cc=ehabkost@redhat.com \
    --cc=laurent@vivier.eu \
    --cc=michael.roth@amd.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /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).