qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Pierrick Bouvier <pierrick.bouvier@linaro.org>
To: "Daniel P. Berrangé" <berrange@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>
Cc: "Manos Pitsidianakis" <manos.pitsidianakis@linaro.org>,
	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>,
	"Gustavo Romero" <gustavo.romero@linaro.org>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Richard Henderson" <richard.henderson@linaro.org>
Subject: Re: [PATCH v2] Add -build-info and -build-info-json CLI arguments
Date: Wed, 25 Sep 2024 10:28:00 -0700	[thread overview]
Message-ID: <8b3732ad-ff9b-40eb-a4d6-46a010f549cd@linaro.org> (raw)
In-Reply-To: <ZvKrqCR5L21-6k54@redhat.com>

On 9/24/24 05:08, Daniel P. Berrangé wrote:
> On Tue, Sep 24, 2024 at 01:02:26PM +0100, Alex Bennée wrote:
>> Manos Pitsidianakis <manos.pitsidianakis@linaro.org> writes:
>>
>>> Hello Daniel,
>>>
>>> On Tue, 24 Sept 2024 at 11:45, Daniel P. Berrangé <berrange@redhat.com> wrote:
>>>>
>>>> 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:
>> <snip>
>>>>>> 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.
>>>
>>> Again, this is not a "capabilities discovery" API. It lists the
>>> build-time configuration of the binary. Perhaps we can expose it in a
>>> different way so that people don't end up confused?
>>
>> I think the problem is however much we might say it's not a capabilities
>> discovery API it's very existence encourages users to use it as one.
>>
>> What about a script:
>>
>>    qemu-get-build-info </path/to/qemu>
>>
>> which would launch the binary and query it over QMP? Would that work?
> 
> If this is purely a debugging aid, we could make use of ELF notes to
> just stick the config-host.h content into the binary. This has precedent
> in systemd package notes (https://github.com/systemd/package-notes) and
> is more clearly *NOT* an end user CLI option, nor a public API in QMP.
> 
> Querying is then
> 
>      objdump -j .note.qemu-config-h -s /usrbin/qemu-system-x86_64
> 
> 
> With regards,
> Daniel

This is neat!
@Manos: it would be convenient to still have a script as Alex mentioned, 
as remembering in which notes the information is hidden might be annoying.

  parent reply	other threads:[~2024-09-25 17:28 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é
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 [this message]
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=8b3732ad-ff9b-40eb-a4d6-46a010f549cd@linaro.org \
    --to=pierrick.bouvier@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=berrange@redhat.com \
    --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=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).