From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org,
Pierrick Bouvier <pierrick.bouvier@linaro.org>,
Richard Henderson <richard.henderson@linaro.org>,
Anton Johansson <anjo@rev.ng>
Subject: Re: [RFC PATCH v3 01/14] qapi: Rename TargetInfo structure as BinaryTargetInfo
Date: Tue, 22 Apr 2025 09:35:39 +0200 [thread overview]
Message-ID: <b846a12d-bbe3-4a88-aecd-b62cd57d297d@linaro.org> (raw)
In-Reply-To: <878qnsagfo.fsf@pond.sub.org>
On 22/4/25 07:55, Markus Armbruster wrote:
> Philippe Mathieu-Daudé <philmd@linaro.org> writes:
>
>> The QAPI-generated 'TargetInfo' structure name is only used
>> in a single file. We want to heavily use another structure
>> similarly named. Rename the QAPI one, since structure names
>> are not part of the public API.
>>
>> Suggested-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
>> ---
>> qapi/machine.json | 12 ++++++------
>> hw/core/machine-qmp-cmds.c | 4 ++--
>> 2 files changed, 8 insertions(+), 8 deletions(-)
>>
>> diff --git a/qapi/machine.json b/qapi/machine.json
>> index a6b8795b09e..3246212f048 100644
>> --- a/qapi/machine.json
>> +++ b/qapi/machine.json
>> @@ -275,15 +275,15 @@
>> { 'command': 'query-current-machine', 'returns': 'CurrentMachineParams' }
>>
>> ##
>> -# @TargetInfo:
>> +# @BinaryTargetInfo:
>> #
>> -# Information describing the QEMU target.
>> +# Information describing the QEMU binary target.
>
> What's "the QEMU binary target"? The QEMU binary's target?
For me 'qemu-system-aarch64' is a QEMU binary, but for Pierrick and
Richard it is the QEMU target, so I merged both names ¯\_(ツ)_/¯
This structure describes the static target configuration built into
a binary, i.e. TARGET_NAME=aarch64, TARGET_BIG_ENDIAN=false.
For the forthcoming single/heterogeneous binary, we don't have a
particular restricted configuration in the binary.
What about "Information describing the QEMU target configuration
built in a binary."?
>
> From the QMP user's point of view, perhaps "the QEMU process's target"
> would make more sense.
So maybe ProcessTargetInfo is a better structure name.
For heterogeneous target I suppose we'll return SYS_EMU_TARGET_HETERO
and we'll provide new QMP commands, possibly returning array of
ProcessTargetInfo.
>
>> #
>> -# @arch: the target architecture
>> +# @arch: the binary target architecture
>
> Are there non-binary target architectures?
:) I won't update this line.
>
>> #
>> # Since: 1.2
>> ##
>> -{ 'struct': 'TargetInfo',
>> +{ 'struct': 'BinaryTargetInfo',
>> 'data': { 'arch': 'SysEmuTarget' } }
>>
>> ##
>> @@ -291,11 +291,11 @@
>> #
>> # Return information about the target for this QEMU
>> #
>> -# Returns: TargetInfo
>> +# Returns: BinaryTargetInfo
>> #
>> # Since: 1.2
>> ##
>> -{ 'command': 'query-target', 'returns': 'TargetInfo' }
>> +{ 'command': 'query-target', 'returns': 'BinaryTargetInfo' }
>>
>> ##
>> # @UuidInfo:
>> diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c
>> index 3130c5cd456..408994b67d7 100644
>> --- a/hw/core/machine-qmp-cmds.c
>> +++ b/hw/core/machine-qmp-cmds.c
>> @@ -132,9 +132,9 @@ CurrentMachineParams *qmp_query_current_machine(Error **errp)
>> return params;
>> }
>>
>> -TargetInfo *qmp_query_target(Error **errp)
>> +BinaryTargetInfo *qmp_query_target(Error **errp)
>> {
>> - TargetInfo *info = g_malloc0(sizeof(*info));
>> + BinaryTargetInfo *info = g_malloc0(sizeof(*info));
>>
>> info->arch = qapi_enum_parse(&SysEmuTarget_lookup, target_name(), -1,
>> &error_abort);
>
next prev parent reply other threads:[~2025-04-22 7:36 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-18 17:28 [RFC PATCH v3 00/14] single-binary: Make hw/arm/ common Philippe Mathieu-Daudé
2025-04-18 17:28 ` [RFC PATCH v3 01/14] qapi: Rename TargetInfo structure as BinaryTargetInfo Philippe Mathieu-Daudé
2025-04-18 17:33 ` Philippe Mathieu-Daudé
2025-04-21 15:47 ` Richard Henderson
2025-04-22 5:55 ` Markus Armbruster
2025-04-22 7:35 ` Philippe Mathieu-Daudé [this message]
2025-04-22 9:10 ` Markus Armbruster
2025-04-22 9:18 ` Philippe Mathieu-Daudé
2025-04-22 12:29 ` BALATON Zoltan
2025-04-22 17:37 ` Pierrick Bouvier
2025-04-18 17:28 ` [RFC PATCH v3 02/14] qemu: Convert target_name() to TargetInfo API Philippe Mathieu-Daudé
2025-04-21 15:56 ` Richard Henderson
2025-04-22 7:44 ` Philippe Mathieu-Daudé
2025-04-18 17:28 ` [RFC PATCH v3 03/14] system/vl: Filter machine list available for a particular target binary Philippe Mathieu-Daudé
2025-04-19 0:57 ` Pierrick Bouvier
2025-04-18 17:28 ` [RFC PATCH v3 04/14] hw/arm: Register TYPE_TARGET_ARM/AARCH64_MACHINE QOM interfaces Philippe Mathieu-Daudé
2025-04-19 0:58 ` Pierrick Bouvier
2025-04-18 17:28 ` [RFC PATCH v3 05/14] hw/core: Allow ARM/Aarch64 binaries to use the 'none' machine Philippe Mathieu-Daudé
2025-04-19 0:59 ` Pierrick Bouvier
2025-04-18 17:29 ` [RFC PATCH v3 06/14] hw/arm: Filter machine types for qemu-system-arm/aarch64 binaries Philippe Mathieu-Daudé
2025-04-19 0:59 ` Pierrick Bouvier
2025-04-18 17:29 ` [RFC PATCH v3 07/14] meson: Prepare to accept per-binary TargetInfo structure implementation Philippe Mathieu-Daudé
2025-04-19 0:59 ` Pierrick Bouvier
2025-04-18 17:29 ` [RFC PATCH v3 08/14] config/target: Implement per-binary TargetInfo structure (ARM, AARCH64) Philippe Mathieu-Daudé
2025-04-19 1:00 ` Pierrick Bouvier
2025-04-18 17:29 ` [RFC PATCH v3 09/14] hw/arm/aspeed: Build objects once Philippe Mathieu-Daudé
2025-04-18 17:29 ` [RFC PATCH v3 10/14] hw/arm/raspi: " Philippe Mathieu-Daudé
2025-04-18 17:29 ` [RFC PATCH v3 11/14] hw/core/machine: Allow dynamic registration of valid CPU types Philippe Mathieu-Daudé
2025-04-19 1:16 ` Pierrick Bouvier
2025-04-19 1:49 ` Pierrick Bouvier
2025-04-18 17:29 ` [RFC PATCH v3 12/14] hw/arm/virt: Register valid CPU types dynamically Philippe Mathieu-Daudé
2025-04-18 17:29 ` [RFC PATCH v3 13/14] qemu/target_info: Add target_aarch64() helper Philippe Mathieu-Daudé
2025-04-19 1:09 ` Pierrick Bouvier
2025-04-19 12:54 ` Philippe Mathieu-Daudé
2025-04-19 15:52 ` Pierrick Bouvier
2025-04-22 6:04 ` Markus Armbruster
2025-04-22 17:50 ` Pierrick Bouvier
2025-04-22 18:24 ` Markus Armbruster
2025-04-22 18:49 ` Pierrick Bouvier
2025-04-18 17:29 ` [RFC PATCH v3 14/14] hw/arm/virt: Replace TARGET_AARCH64 -> target_aarch64() 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=b846a12d-bbe3-4a88-aecd-b62cd57d297d@linaro.org \
--to=philmd@linaro.org \
--cc=anjo@rev.ng \
--cc=armbru@redhat.com \
--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).