Philippe Mathieu-Daudé <[email protected]> writes:
> On 25/4/25 09:35, Daniel P. Berrangé wrote:
>> On Thu, Apr 24, 2025 at 11:33:47AM -0700, Pierrick Bouvier wrote:
>>> Feedback
>>> ========
>>>
>>> The goal of this series is to be spark a conversation around following
>>> topics:
>>>
>>> - Would you be open to such an approach? (expose all code, and restrict
>>> commands
>>> registered at runtime only for specific targets)
>> QMP defines a public API between QEMU and external mgmt apps, and personally
>> I
>> like the idea that the API exposed is identical across all binaries and thus
>> the API becomes independent of the impl choice of combined vs separate
>> binaries,.
>
> I tried to expose all structures / unions as a first step (not yet
> commands) but realized even structure fields can be conditional,
Correct. See docs/devel/qapi-code-gen.rst section "Configuring the
schema".
> see @deprecated-props:
>
> ##
> # @CpuModelExpansionInfo:
> #
> # The result of a cpu model expansion.
> #
> # @model: the expanded CpuModelInfo.
> #
> # @deprecated-props: a list of properties that are flagged as
> # deprecated by the CPU vendor. The list depends on the
> # CpuModelExpansionType: "static" properties are a subset of the
> # enabled-properties for the expanded model; "full" properties are
> # a set of properties that are deprecated across all models for
> # the architecture. (since: 9.1).
> #
> # Since: 2.8
> ##
> { 'struct': 'CpuModelExpansionInfo',
> 'data': { 'model': 'CpuModelInfo',
> 'deprecated-props' : { 'type': ['str'],
> 'if': 'TARGET_S390X' } },
> 'if': { 'any': [ 'TARGET_S390X',
> 'TARGET_I386',
> 'TARGET_ARM',
> 'TARGET_LOONGARCH64',
> 'TARGET_RISCV' ] } }