Daniel P. Berrangé <[email protected]> writes:

> On Fri, Nov 13, 2026 at 08:53:58AM +0100, Markus Armbruster wrote:
>> Daniel P. Berrangé <[email protected]> writes:
>> 
>> > Add a 'targets' field to MachineInfo which is populated with
>> > the list of targets a machine is declard to be compatible
>> > with.
>> >
>> > To avoid reporting redundant information for the traditional
>> > per-target emulator binaries, this new field is only emitted
>> > if no target is currently selected, or the 'all-targets'
>> > flag is explicitly set.
>> 
>> How much redundant data does this save in practice?
>> 
>> Is saving it worth the additional interface complexity?
>
> All the arm machine types will report
>
>   targets: [ "arm", "aarch64"]
>
> except for a handful which will be
>
>   targets: [ "aarch64"]
>
> In a multi-target binary (ie what we intend to ship in
> future, along side current binaries), it makes sense
> that we report this, but in a single target binary
> (ie what we ship today), it feels somewhat odd to me
> to be reporting
>
>   targets: [ "arm", "aarch64"]
>
> in the qemu-system-arm binary, given it can't support
> aarch64.
>
> So I wanted to hide the 'targets' output when a specific
> target is selected.
>
> Functionally there is no problem with reporting this
> unconditionally in all scenarios. It just felt odd,
> which admittedly is a weak reason for a technical
> choice.

@targets is described as "a list of compatible targets for the machine".
Doesn't say "compatible targets this QEMU can do".

The targets this QEMU can do are available elsewhere.  Right now, QEMU
can do just one, and query-target returns it.  I expect future versions
that can support multiple targets will provide a query to return them
all.

I'd keep things simple and stateless: list all targets always.  Clients
can easily compute the intersection with the targets this QEMU can do.

>> > Signed-off-by: Daniel P. Berrangé <[email protected]>
>> 
>
> With regards,
> Daniel


Reply via email to