From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Cc: qemu-devel@nongnu.org,
"Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>
Subject: Re: [PATCH 0/8] multi-target: remove qmp_query_cpu_definitions duplication
Date: Thu, 15 Oct 2026 08:59:21 +0100 [thread overview]
Message-ID: <atCH2S_2ePv4y2DW@redhat.com> (raw)
In-Reply-To: <20261015005355.62406-1-pierrick.bouvier@oss.qualcomm.com>
On Thu, Oct 15, 2026 at 12:53:47AM +0000, Pierrick Bouvier wrote:
> This series allows to link multiple targets that define
> qmp_query_cpu_definitions. It simply replaces the duplicated definitions with
> target-specific ones and a single dispatcher. We didn't use yet the dispatcher
> pattern, and it's the first situation where it appears to be a good fit.
>
> A possible alternative would be to introduce this callback directly at
> target-info level, which I think is a less desirable solution, since it would
> ties this API to monitor.
>
> If the approach here is accepted, I'll extend this series with
> qmp_query_cpu_model_expansion which follows the same pattern.
> With this, we'll be free to link together almost all the base architectures.
>
> Pierrick Bouvier (8):
> target/arm: rename qmp_query_cpu_definitions to
> qmp_query_arm_cpu_definitions
> target/i386: rename qmp_query_cpu_definitions to
> qmp_query_i386_cpu_definitions
> target/loongarch: rename to qmp_query_loongarch_cpu_definitions
> target/mips: rename qmp_query_cpu_definitions to
> qmp_query_mips_cpu_definitions
> target/ppc: rename qmp_query_cpu_definitions to
> qmp_query_ppc_cpu_definitions
> target/riscv: rename to qmp_query_cpu_definitions to
> qmp_query_riscv_cpu_definitions
> target/s390x: rename qmp_query_cpu_definitions to
> qmp_query_s390x_cpu_definitions
> qmp: reimplement qmp_query_cpu_definitions as a dispatcher function
>
> hw/core/machine-qmp-cmds.c | 32 +++++++++++++++++++++++++++
> include/system/qmp-cpu.h | 20 +++++++++++++++++
> stubs/meson.build | 6 +++++
> stubs/qmp-cpu-arm.c | 9 ++++++++
> stubs/qmp-cpu-i386.c | 9 ++++++++
> stubs/qmp-cpu-loongarch.c | 9 ++++++++
> stubs/qmp-cpu-mips.c | 9 ++++++++
> stubs/qmp-cpu-ppc.c | 9 ++++++++
> stubs/qmp-cpu-riscv.c | 9 ++++++++
> stubs/qmp-cpu-s390x.c | 6 +++++
> stubs/qmp-cpu.c | 7 ------
> target/arm/arm-qmp-cmds.c | 3 ++-
> target/i386/cpu.c | 3 ++-
> target/loongarch/loongarch-qmp-cmds.c | 3 ++-
> target/mips/system/mips-qmp-cmds.c | 3 ++-
> target/ppc/ppc-qmp-cmds.c | 3 ++-
> target/riscv/riscv-qmp-cmds.c | 3 ++-
> target/s390x/cpu_models_system.c | 3 ++-
> 18 files changed, 132 insertions(+), 14 deletions(-)
> create mode 100644 include/system/qmp-cpu.h
> create mode 100644 stubs/qmp-cpu-arm.c
> create mode 100644 stubs/qmp-cpu-i386.c
> create mode 100644 stubs/qmp-cpu-loongarch.c
> create mode 100644 stubs/qmp-cpu-mips.c
> create mode 100644 stubs/qmp-cpu-ppc.c
> create mode 100644 stubs/qmp-cpu-riscv.c
For series:
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com ~~ https://hachyderm.io/@berrange :|
|: https://libvirt.org ~~ https://entangle-photo.org :|
|: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
prev parent reply other threads:[~2026-10-15 7:59 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-15 0:53 [PATCH 0/8] multi-target: remove qmp_query_cpu_definitions duplication Pierrick Bouvier
2026-10-15 0:53 ` [PATCH 1/8] target/arm: rename qmp_query_cpu_definitions to qmp_query_arm_cpu_definitions Pierrick Bouvier
2026-10-15 0:53 ` [PATCH 2/8] target/i386: rename qmp_query_cpu_definitions to qmp_query_i386_cpu_definitions Pierrick Bouvier
2026-10-15 0:53 ` [PATCH 3/8] target/loongarch: rename to qmp_query_loongarch_cpu_definitions Pierrick Bouvier
2026-10-15 0:53 ` [PATCH 4/8] target/mips: rename qmp_query_cpu_definitions to qmp_query_mips_cpu_definitions Pierrick Bouvier
2026-10-15 0:53 ` [PATCH 5/8] target/ppc: rename qmp_query_cpu_definitions to qmp_query_ppc_cpu_definitions Pierrick Bouvier
2026-10-15 0:53 ` [PATCH 6/8] target/riscv: rename to qmp_query_cpu_definitions to qmp_query_riscv_cpu_definitions Pierrick Bouvier
2026-10-15 0:53 ` [PATCH 7/8] target/s390x: rename qmp_query_cpu_definitions to qmp_query_s390x_cpu_definitions Pierrick Bouvier
2026-10-15 0:53 ` [PATCH 8/8] qmp: reimplement qmp_query_cpu_definitions as a dispatcher function Pierrick Bouvier
2026-10-15 5:57 ` Markus Armbruster
2026-10-15 6:14 ` Pierrick Bouvier
2026-10-15 2:20 ` [PATCH 0/8] multi-target: remove qmp_query_cpu_definitions duplication Yonggang Luo
2026-10-15 4:46 ` Yonggang Luo
2026-10-15 5:58 ` Markus Armbruster
2026-10-15 6:13 ` Pierrick Bouvier
2026-10-15 6:36 ` Yonggang Luo
2026-10-15 7:57 ` Daniel P. Berrangé
2026-10-15 7:59 ` Daniel P. Berrangé [this message]
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=atCH2S_2ePv4y2DW@redhat.com \
--to=berrange@redhat.com \
--cc=armbru@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=philmd@oss.qualcomm.com \
--cc=pierrick.bouvier@oss.qualcomm.com \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.