All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Cc: "Markus Armbruster" <armbru@redhat.com>,
	qemu-devel@nongnu.org,
	"Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: Re: [PATCH 0/8] multi-target: remove qmp_query_cpu_definitions duplication
Date: Fri, 16 Oct 2026 09:53:16 +0100	[thread overview]
Message-ID: <atHl_Dvx3N8r_IXV@redhat.com> (raw)
In-Reply-To: <e9807140-5a65-413e-be58-c3e268125431@oss.qualcomm.com>

On Thu, Oct 15, 2026 at 10:57:50AM -0700, Pierrick Bouvier wrote:
> On 10/15/2026 12:57 AM, Daniel P. Berrangé wrote:
> > On Thu, Oct 15, 2026 at 07:58:29AM +0200, Markus Armbruster wrote:
> >> Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com> writes:
> >>
> >>> 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.
> >>
> >> I'm curious... why would such a tie be undesirable?
> > 
> > I don't think target-info should be involved at all, it is a problem
> > to solve in the CPU type system. The CPU definitions are introspecting
> > sub-classes of TYPE_CPU.
> > 
> > IMHO the right way to solve this is for CPUClass to gain a callback for
> > introspection, and for each target to provide an impl of that callback.
> > 
> > There should only be a single qmp_query_cpu_definitions method that
> > introspects all registered TYPE_CPU subclasses. That way in a
> > multi-target binary, the introspection will return info for all
> > CPUs for all compiled in targets.
> >
> 
> I was wondering if what we would like to expose is all targets, or only
> the ones that have a cpu active.

Introspection commands such as this one generally should report on
everything that is built-in to the binary.

> > That would need refactoring of the current qmp_query_cpu_definitions
> > methods which is a bigger job. This series as is, is a reasonable
> > small initial stepping stone to make it possible to link the binaries,
> > before a later followup patch to do the full refactoring to get the
> > desirable API semantics.
> >
> 
> That was the goal 👍.
> 

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 :|



  reply	other threads:[~2026-10-16  8:54 UTC|newest]

Thread overview: 21+ 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 17:57     ` Pierrick Bouvier
2026-10-16  8:53       ` Daniel P. Berrangé [this message]
2026-10-15  7:59 ` Daniel P. Berrangé
2026-10-16 16:18 ` Pierrick Bouvier

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=atHl_Dvx3N8r_IXV@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.