qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Cc: qemu-devel@nongnu.org, "Cleber Rosa" <crosa@redhat.com>,
	"John Snow" <jsnow@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Alex Benné e" <alex.bennee@linaro.org>,
	"Gustavo Romero" <gustavo.romero@linaro.org>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
	"Richard Henderson" <richard.henderson@linaro.org>
Subject: Re: [PATCH v2] Add -build-info and -build-info-json CLI arguments
Date: Tue, 24 Sep 2024 10:45:25 +0200	[thread overview]
Message-ID: <ZvJ8JblXVH-kJGi1@redhat.com> (raw)
In-Reply-To: <ka5ia.wqlrej2ef9q@linaro.org>

On Mon, Sep 23, 2024 at 10:09:32PM +0300, Manos Pitsidianakis wrote:
> Hello Daniel,
> 
> On Mon, 23 Sep 2024 19:45, "Daniel P. Berrangé" <berrange@redhat.com> wrote:
> > On Mon, Sep 23, 2024 at 09:05:24AM +0300, Manos Pitsidianakis wrote:
> > > Add -build-info and -build-info-json CLI arguments for human and machine
> > > readable output of build/compile-time configuration data. The source for
> > > this data is the meson generated config-host.h.
> > > 
> > > This information is mainly of interest to developers and other folk who
> > > deal with many different builds of QEMU and need a way to properly
> > > differentiate them.
> > > 
> > > Because there's always the chance someone will want to consume an
> > > interface programmatically, also add a -json option that does the same
> > > but outputs a machine-readable JSON object.
> > 
> > This turns our build system configuration information into a
> > defacto public API, and while its using JSON, it isn't yusing
> > QAPI.
> > 
> > To some degree we leak our build system config names externally
> > because the "if" stanzas in the QAPI schema get copied into the
> > docs.
> > 
> > Overall though I don't think we should be exposing this build
> > config infomation externally. We've had many times, particularly
> > with testing, where people have wanted to access CONFIG_XXX info
> > about a QEMU binary, but IIRC we've always steered people towards
> > querying for the actual feature they want, rather than looking
> > at CONFIG_XXX settings.
> > 
> > ie, look a query-audiodevs to discover what audio baxckends are
> > built-in, don't look for CONFIG_XXX settings related to audio.
> > If there are gaps in information we can query from QMP, we should
> > aim to close those gaps.
> > 
> > IOW, I don't think we should expose this build info info in either
> > human readable or machine readable format.
> 
> QAPI/QMP is not the perspective of this patch, this is for people who use
> custom-built (i.e. not from a distro) binaries and want to be able to
> identify how it was built. Launching a binary to query stuff is
> unnecessarily complex for this task, and the info is not generally
> interesting to the API consumers as you said.

Launching QEMU to talk QMP is our defined public API for querying
anything about the capabilities of QEMU. We're worked hard to get
away from providing ad-hoc ways to query QEMU from the command
line and going back to that is not desirable. It may be slightly
more complicated, but not by very much.

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  reply	other threads:[~2024-09-24  8:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-23  6:05 [PATCH v2] Add -build-info and -build-info-json CLI arguments Manos Pitsidianakis
2024-09-23 16:45 ` Daniel P. Berrangé
2024-09-23 19:09   ` Manos Pitsidianakis
2024-09-24  8:45     ` Daniel P. Berrangé [this message]
2024-09-24  9:25       ` Manos Pitsidianakis
2024-09-24 12:02         ` Alex Bennée
2024-09-24 12:08           ` Daniel P. Berrangé
2024-09-24 12:32             ` Manos Pitsidianakis
2024-09-25 17:28             ` Pierrick Bouvier
2024-09-23 16:56 ` 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=ZvJ8JblXVH-kJGi1@redhat.com \
    --to=berrange@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=crosa@redhat.com \
    --cc=gustavo.romero@linaro.org \
    --cc=jsnow@redhat.com \
    --cc=manos.pitsidianakis@linaro.org \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=pierrick.bouvier@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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 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).