On 11/13/2026 1:36 AM, Daniel P. Berrangé wrote: > 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. >
I don't feel it's really odd. You could consider it's odd to report different things when talking about same machine across multiple targets. It seems most of our effort on QAPI side has been to remove any target specific and expose all details all the time. If we follow this logic, it should be perfectly fine to return [ "arm", "aarch64"], even if "arm" target is not present in binary. Also, it creates a distinct behaviour between qemu-system-X and qemu-system, which is not necessarily a desirable thing. >>> Signed-off-by: Daniel P. Berrangé <[email protected]> >> > > With regards, > Daniel Regards, Pierrick
