[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 08/10] qapi: Make CpuModelExpansionInfo::deprecated-props opt
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH 08/10] qapi: Make CpuModelExpansionInfo::deprecated-props optional and generic |
Date: |
Tue, 13 May 2025 13:41:52 +0100 |
User-agent: |
Mutt/2.2.14 (2025-02-20) |
On Tue, May 13, 2025 at 02:38:40PM +0200, Markus Armbruster wrote:
> Copying my review from the initial posting:
>
> Daniel P. Berrangé <berrange@redhat.com> writes:
>
> > From: Philippe Mathieu-Daudé <philmd@linaro.org>
> >
> > We'd like to have some unified QAPI schema. Having a structure field
> > conditional to a target being built in is not very practical.
> >
> > While @deprecated-props is only used by s390x target, it is generic
> > enough and could be used by other targets (assuming we expand
> > CpuModelExpansionType enum values).
> >
> > Let's always include this field, regardless of the target, but
> > make it optional.
> >
> > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> > ---
> > qapi/machine-target.json | 7 +++----
> > 1 file changed, 3 insertions(+), 4 deletions(-)
> >
> > diff --git a/qapi/machine-target.json b/qapi/machine-target.json
> > index 541f93eeb7..3b109b4af8 100644
> > --- a/qapi/machine-target.json
> > +++ b/qapi/machine-target.json
> > @@ -244,19 +244,18 @@
> > #
> > # @model: the expanded CpuModelInfo.
> > #
> > -# @deprecated-props: a list of properties that are flagged as
> > +# @deprecated-props: an optional 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).
> > +# the architecture. (since: 10.1 -- since 9.1 on s390x --).
> > #
> > # Since: 2.8
> > ##
> > { 'struct': 'CpuModelExpansionInfo',
> > 'data': { 'model': 'CpuModelInfo',
> > - 'deprecated-props' : { 'type': ['str'],
> > - 'if': 'TARGET_S390X' } },
> > + '*deprecated-props' : { 'type': ['str'] } },
>
> Make this
>
> '*deprecated-props' : ['str'] },
>
> please.
>
> When I see "optional array", I wonder about the difference between
> "absent" and "present and empty". The doc comment doesn't quite explain
> it. I figure "present and empty" means empty, while "absent" means we
> don't know / not implemented.
>
> Is the difference useful?
I'm doubtful that the difference is useful.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
- [PATCH 05/10] qapi: make SGX commands unconditionally available, (continued)
[PATCH 07/10] qapi: remove the misc-target.json file, Daniel P . Berrangé, 2025/05/08
[PATCH 04/10] qapi: expose query-gic-capability command unconditionally, Daniel P . Berrangé, 2025/05/08
[PATCH 08/10] qapi: Make CpuModelExpansionInfo::deprecated-props optional and generic, Daniel P . Berrangé, 2025/05/08
[PATCH 09/10] qapi: make most CPU commands unconditionally available, Daniel P . Berrangé, 2025/05/08
[PATCH 10/10] qapi: make s390x specific CPU commands unconditionally available, Daniel P . Berrangé, 2025/05/08
Re: [PATCH RFC 00/10] qapi: remove all TARGET_* conditionals from the schema, Philippe Mathieu-Daudé, 2025/05/08
Re: [PATCH RFC 00/10] qapi: remove all TARGET_* conditionals from the schema, Pierrick Bouvier, 2025/05/08