From: Markus Armbruster <armbru@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: "Richard Henderson" <richard.henderson@linaro.org>,
qemu-devel@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
"Thomas Huth" <thuth@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [RFC PATCH 04/18] qemu: Introduce 'qemu/legacy_binary_info.h'
Date: Sat, 22 Mar 2025 07:59:04 +0100 [thread overview]
Message-ID: <87bjttzh3b.fsf@pond.sub.org> (raw)
In-Reply-To: <014fe512-6271-4de3-8587-7ceafbc8c6b5@linaro.org> ("Philippe Mathieu-Daudé"'s message of "Wed, 19 Mar 2025 15:25:33 +0100")
Philippe Mathieu-Daudé <philmd@linaro.org> writes:
> Cc'ing Markus.
>
> On 6/3/25 02:56, Richard Henderson wrote:
>> On 3/5/25 07:39, Philippe Mathieu-Daudé wrote:
>>> +void legacy_binary_info_init(const char *argv0)
>>> +{
>
>
>>> + for (size_t i = 0; i < ARRAY_SIZE(legacy_binary_infos); i++) {
>>> + if (!strcmp(legacy_binary_infos[i].binary_name, binary_name)) {
>>> + current_index = i;
>>> + return;
>>> + }
>>> + }
>
>
>> When testing for errors before and after a patch, I often rename
>> the binary, e.g. qemu-system-aarch64-good / qemu-system-aarch64-bad.
>
> I'd not qemu-system-microblazeel-good to match qemu-system-microblaze.
>
>> Leaving it in the same build directory is required in order to let
>> it find the uninstalled rom images.
>> Is there a way we can preserve something akin to this?
>> Do we need to add the -target command-line option that Pierrick mooted?
Having behavior depend on the binary name is problematic. When users
run it with some other name (renamed binary, link to binary), behavior
changes, which is generally not desired and may be quite confusing.
I guess you want to do it here to replace multiple binaries by a single
one with several names. Correct?
The stupid solution is to configure the single binary's behavior the
non-clever way with command line options such as -target, then provide
compatibility wrappers that run the single binary with suitable options.
Drawback: wrappers are slow, ugly, and can also be confusing. Say when
you rename just the wrapper to -good and -bad.
If we want to go with behavior depending on the binary name, we could
try to reduce confusion by making unorthodox names fail cleanly. Say
make -target optional only when the binary name matches exactly.
> Not that easy, CLI is evaluated *after* QOM types are registered.
> IIUC we'd need to add this as a -preconfig option, Markus is that right?
Ah, the startup mess. I don't remember a thing. Except for the need to
have QMP up and running before any non-trivial startup. To get that,
the command line needs to be processed this early, too.
-preconfig is a disgusting hack to delay parts of startup until it's
explicitly triggered in the monitor. Not a general solution for "need
to configurate more before startup", and not sure it helps here.
next prev parent reply other threads:[~2025-03-22 6:59 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-05 15:39 [RFC PATCH 00/18] hw/microblaze: Quick single binary proof of concept Philippe Mathieu-Daudé
2025-03-05 15:39 ` [RFC PATCH 01/18] hw/xen/hvm: Fix Aarch64 typo Philippe Mathieu-Daudé
2025-03-05 16:53 ` Pierrick Bouvier
2025-03-06 1:35 ` Richard Henderson
2025-03-13 8:10 ` Michael Tokarev
2025-03-13 9:40 ` Philippe Mathieu-Daudé
2025-03-05 15:39 ` [RFC PATCH 02/18] hw/vfio/common: Get target page size using runtime helpers Philippe Mathieu-Daudé
2025-03-06 1:37 ` Richard Henderson
2025-03-05 15:39 ` [RFC PATCH 03/18] include: Poison TARGET_PHYS_ADDR_SPACE_BITS definition Philippe Mathieu-Daudé
2025-03-06 1:37 ` Richard Henderson
2025-03-05 15:39 ` [RFC PATCH 04/18] qemu: Introduce 'qemu/legacy_binary_info.h' Philippe Mathieu-Daudé
2025-03-05 16:59 ` Pierrick Bouvier
2025-03-06 7:26 ` Thomas Huth
2025-03-06 9:26 ` Philippe Mathieu-Daudé
2025-03-06 11:34 ` Paolo Bonzini
2025-03-06 11:52 ` Daniel P. Berrangé
2025-03-06 13:45 ` BALATON Zoltan
2025-03-06 15:15 ` Daniel P. Berrangé
2025-03-06 15:28 ` BALATON Zoltan
2025-03-06 21:45 ` Pierrick Bouvier
2025-03-07 0:46 ` BALATON Zoltan
2025-03-05 19:19 ` Paolo Bonzini
2025-03-06 1:56 ` Richard Henderson
2025-03-06 12:13 ` Daniel P. Berrangé
2025-03-19 14:25 ` Philippe Mathieu-Daudé
2025-03-22 6:59 ` Markus Armbruster [this message]
2025-03-05 15:39 ` [RFC PATCH 05/18] qemu: Introduce legacy_binary_is_64bit() helper Philippe Mathieu-Daudé
2025-03-05 15:39 ` [RFC PATCH 06/18] hw/mips/mipssim: Replace TARGET_MIPS64 by legacy_binary_is_64bit() Philippe Mathieu-Daudé
2025-03-05 15:39 ` [RFC PATCH 07/18] hw/mips/malta: " Philippe Mathieu-Daudé
2025-03-05 15:39 ` [RFC PATCH 08/18] hw/i386: Inline TARGET_DEFAULT_CPU_TYPE definition Philippe Mathieu-Daudé
2025-03-05 15:39 ` [RFC PATCH 09/18] hw/ppc/mac: Replace TARGET_PPC64 by legacy_binary_is_64bit() Philippe Mathieu-Daudé
2025-03-05 15:39 ` [RFC PATCH 10/18] qemu: Introduce legacy_binary_is_big_endian() helper Philippe Mathieu-Daudé
2025-03-06 7:28 ` Thomas Huth
2025-03-06 14:10 ` Philippe Mathieu-Daudé
2025-03-05 15:39 ` [RFC PATCH 11/18] hw/mips/jazz: Replace TARGET_BIG_ENDIAN by legacy_binary_is_big_endian Philippe Mathieu-Daudé
2025-03-05 15:39 ` [RFC PATCH 12/18] hw/mips/mipssim: Use legacy_binary_is_big_endian() Philippe Mathieu-Daudé
2025-03-05 15:39 ` [RFC PATCH 13/18] hw/xtensa/sim: Replace TARGET_BIG_ENDIAN by legacy_binary_is_big_endian Philippe Mathieu-Daudé
2025-03-05 15:39 ` [RFC PATCH 14/18] hw/xtensa/xtfpga: Check endianness via legacy_binary_is_big_endian() Philippe Mathieu-Daudé
2025-03-05 15:39 ` [RFC PATCH 15/18] hw/microblaze/petalogix_ml605_mmu: Use legacy_binary_is_big_endian() Philippe Mathieu-Daudé
2025-03-05 15:39 ` [RFC PATCH 16/18] hw/microblaze/petalogix_s3adsp1800_mmu: Use legacy_binary_is_big_endian Philippe Mathieu-Daudé
2025-03-05 15:39 ` [RFC PATCH 17/18] meson: Allow symlinking system emulation binaries Philippe Mathieu-Daudé
2025-03-05 15:39 ` [RFC PATCH 18/18] configs/targets: Merge qemu-system-microblaze{el} binaries Philippe Mathieu-Daudé
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=87bjttzh3b.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=pierrick.bouvier@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.com \
/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.