(+Pierrick for historical background)
On 15/3/24 14:08, Philippe Mathieu-Daudé wrote:
Hi Alex, Markus,
Markus mentioned QAPI problems with the heterogeneous emulation
binary. My understanding is, while QAPI can use host-specific
conditional (OS, library available, configure option), it
shouldn't use target-specific ones.
This series is an example on how to remove target specific
bits from the @query-cpu-definitions command. Target specific
code is registered as CPUClass handlers, then a generic method
is used, iterating over all targets built in.
The first set of patches were already posted / reviewed last
year.
The PPC and S390X targets still need work (help welcomed),
however the code is useful enough to be tested and see if this
is a good approach.
The only drawback is a change in QAPI introspection, because
targets not implementing @query-cpu-definitions were returning
"CommandNotFound". My view is this was an incomplete
implementation, rather than a feature.
Regards,
Phil.