[PATCH-for-11.0? 0/6] qom: Restrict compat properties API to system emulation

Philippe Mathieu-Daudé posted 6 patches 1 week, 1 day ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260325151728.45378-1-philmd@linaro.org
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, David Hildenbrand <david@kernel.org>, Igor Mammedov <imammedo@redhat.com>, "Alex Bennée" <alex.bennee@linaro.org>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Yanan Wang <wangyanan55@huawei.com>, Zhao Liu <zhao1.liu@intel.com>, "Daniel P. Berrangé" <berrange@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>
MAINTAINERS                       |  21 +++---
configure                         |  64 +++++++++++++----
meson.build                       |   2 +-
include/hw/core/boards.h          |  11 +++
include/hw/core/qdev-properties.h |   1 +
include/hw/core/qdev.h            |  27 -------
include/qom/compat-properties.h   |  40 +++++++++++
include/qom/object.h              |   8 ---
accel/accel-system.c              |   1 +
backends/hostmem.c                |   1 +
hw/core/machine.c                 |   1 +
hw/core/qdev-properties.c         |   1 +
hw/core/qdev.c                    |   1 +
hw/i386/pc_q35.c                  |   1 +
qom/compat-properties.c           | 116 ++++++++++++++++++++++++++++++
qom/object.c                      | 102 +-------------------------
system/rtc.c                      |   1 +
system/vl.c                       |   1 +
target/i386/sev.c                 |   1 +
ui/vdagent.c                      |   1 +
qom/meson.build                   |   3 +
21 files changed, 248 insertions(+), 157 deletions(-)
create mode 100644 include/qom/compat-properties.h
create mode 100644 qom/compat-properties.c
[PATCH-for-11.0? 0/6] qom: Restrict compat properties API to system emulation
Posted by Philippe Mathieu-Daudé 1 week, 1 day ago
Remove QDev uses from QOM to help build the guest-agent
binary without pulling in QDev methods.

After that only util/qsp.c is left (cond/mutex atomics),
see this thread:
https://lore.kernel.org/qemu-devel/a547c29b-3ab7-42fe-889a-19668bc9d090@tls.msk.ru/

Philippe Mathieu-Daudé (6):
  MAINTAINERS: Separate QDev section from QOM one
  hw/core: Move compat_props_add() to 'hw/core/boards.h'
  qom: Declare GlobalProperty structure in 'qom/compat-properties.h'
  qom: Declare compat properties API in 'qom/compat-properties.h'
  qom: Restrict compat properties API to system emulation
  buildsys: Allow building guest-agent on 32-bit hosts

 MAINTAINERS                       |  21 +++---
 configure                         |  64 +++++++++++++----
 meson.build                       |   2 +-
 include/hw/core/boards.h          |  11 +++
 include/hw/core/qdev-properties.h |   1 +
 include/hw/core/qdev.h            |  27 -------
 include/qom/compat-properties.h   |  40 +++++++++++
 include/qom/object.h              |   8 ---
 accel/accel-system.c              |   1 +
 backends/hostmem.c                |   1 +
 hw/core/machine.c                 |   1 +
 hw/core/qdev-properties.c         |   1 +
 hw/core/qdev.c                    |   1 +
 hw/i386/pc_q35.c                  |   1 +
 qom/compat-properties.c           | 116 ++++++++++++++++++++++++++++++
 qom/object.c                      | 102 +-------------------------
 system/rtc.c                      |   1 +
 system/vl.c                       |   1 +
 target/i386/sev.c                 |   1 +
 ui/vdagent.c                      |   1 +
 qom/meson.build                   |   3 +
 21 files changed, 248 insertions(+), 157 deletions(-)
 create mode 100644 include/qom/compat-properties.h
 create mode 100644 qom/compat-properties.c

-- 
2.53.0


Re: [PATCH-for-11.0? 0/6] qom: Restrict compat properties API to system emulation
Posted by Michael Tokarev 1 week ago
25.03.2026 18:17, Philippe Mathieu-Daudé wrote:
> Remove QDev uses from QOM to help build the guest-agent
> binary without pulling in QDev methods.
> 
> After that only util/qsp.c is left (cond/mutex atomics),
> see this thread:
> https://lore.kernel.org/qemu-devel/a547c29b-3ab7-42fe-889a-19668bc9d090@tls.msk.ru/
> 
> Philippe Mathieu-Daudé (6):
>    MAINTAINERS: Separate QDev section from QOM one
>    hw/core: Move compat_props_add() to 'hw/core/boards.h'
>    qom: Declare GlobalProperty structure in 'qom/compat-properties.h'
>    qom: Declare compat properties API in 'qom/compat-properties.h'
>    qom: Restrict compat properties API to system emulation
>    buildsys: Allow building guest-agent on 32-bit hosts

Series:

Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>

This definitely helps with qemu-ga issue (a few steps closer to it,
anyway), makes things better separated and cleaner, and might even
be simple enough for 11.0.  Though I'm not sure for the latter.

Thank you Philippe for this!

/mjt

>   MAINTAINERS                       |  21 +++---
>   configure                         |  64 +++++++++++++----
>   meson.build                       |   2 +-
>   include/hw/core/boards.h          |  11 +++
>   include/hw/core/qdev-properties.h |   1 +
>   include/hw/core/qdev.h            |  27 -------
>   include/qom/compat-properties.h   |  40 +++++++++++
>   include/qom/object.h              |   8 ---
>   accel/accel-system.c              |   1 +
>   backends/hostmem.c                |   1 +
>   hw/core/machine.c                 |   1 +
>   hw/core/qdev-properties.c         |   1 +
>   hw/core/qdev.c                    |   1 +
>   hw/i386/pc_q35.c                  |   1 +
>   qom/compat-properties.c           | 116 ++++++++++++++++++++++++++++++
>   qom/object.c                      | 102 +-------------------------
>   system/rtc.c                      |   1 +
>   system/vl.c                       |   1 +
>   target/i386/sev.c                 |   1 +
>   ui/vdagent.c                      |   1 +
>   qom/meson.build                   |   3 +
>   21 files changed, 248 insertions(+), 157 deletions(-)
>   create mode 100644 include/qom/compat-properties.h
>   create mode 100644 qom/compat-properties.c
>