qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org, "Peter Maydell" <peter.maydell@linaro.org>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
	"Richard Henderson" <richard.henderson@linaro.org>
Subject: Re: [PATCH 08/10] qapi: Make CpuModelExpansionInfo::deprecated-props optional and generic
Date: Tue, 13 May 2025 13:41:52 +0100	[thread overview]
Message-ID: <aCM-ECjLAPjr5ITz@redhat.com> (raw)
In-Reply-To: <87r00sd6sv.fsf@pond.sub.org>

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 :|



  reply	other threads:[~2025-05-13 12:42 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-08 13:58 [PATCH RFC 00/10] qapi: remove all TARGET_* conditionals from the schema Daniel P. Berrangé
2025-05-08 13:58 ` [PATCH 01/10] qapi: expose rtc-reset-reinjection command unconditionally Daniel P. Berrangé
2025-05-10  9:57   ` Markus Armbruster
2025-05-12 18:33     ` Daniel P. Berrangé
2025-05-13  0:54       ` Pierrick Bouvier
2025-05-13  1:09         ` Pierrick Bouvier
2025-05-13  7:55       ` Markus Armbruster
2025-05-08 13:58 ` [PATCH 02/10] qapi: expand docs for SEV commands Daniel P. Berrangé
2025-05-13 12:06   ` Markus Armbruster
2025-05-13 12:21     ` Daniel P. Berrangé
2025-05-08 13:58 ` [PATCH 03/10] qapi: make SEV commands unconditionally available Daniel P. Berrangé
2025-05-08 13:58 ` [PATCH 04/10] qapi: expose query-gic-capability command unconditionally Daniel P. Berrangé
2025-05-08 13:58 ` [PATCH 05/10] qapi: make SGX commands unconditionally available Daniel P. Berrangé
2025-05-08 13:58 ` [PATCH 06/10] qapi: make Xen event " Daniel P. Berrangé
2025-05-08 15:01   ` Philippe Mathieu-Daudé
2025-05-08 17:48     ` David Woodhouse
2025-05-08 17:53       ` Daniel P. Berrangé
2025-05-08 19:08         ` David Woodhouse
2025-05-08 13:58 ` [PATCH 07/10] qapi: remove the misc-target.json file Daniel P. Berrangé
2025-05-08 13:58 ` [PATCH 08/10] qapi: Make CpuModelExpansionInfo::deprecated-props optional and generic Daniel P. Berrangé
2025-05-13 12:38   ` Markus Armbruster
2025-05-13 12:41     ` Daniel P. Berrangé [this message]
2025-05-08 13:58 ` [PATCH 09/10] qapi: make most CPU commands unconditionally available Daniel P. Berrangé
2025-05-08 20:55   ` Pierrick Bouvier
2025-05-13 12:44   ` Markus Armbruster
2025-05-13 16:37     ` Daniel P. Berrangé
2025-05-08 13:58 ` [PATCH 10/10] qapi: make s390x specific " Daniel P. Berrangé
2025-05-08 14:56 ` [PATCH RFC 00/10] qapi: remove all TARGET_* conditionals from the schema Philippe Mathieu-Daudé
2025-05-08 14:58   ` Daniel P. Berrangé
2025-05-08 21:09 ` Pierrick Bouvier
2025-05-09  9:02   ` Daniel P. Berrangé
2025-05-09 13:43     ` Markus Armbruster
2025-05-09 13:56       ` Daniel P. Berrangé
2025-05-10  6:08         ` Markus Armbruster
2025-05-12 18:38           ` Daniel P. Berrangé
2025-05-10  9:28 ` Markus Armbruster
2025-05-12 18:39   ` Daniel P. Berrangé
2025-05-12 20:09     ` Pierrick Bouvier
2025-05-13  7:59       ` Markus Armbruster
2025-05-13 14:36         ` Pierrick Bouvier
2025-05-13 14:55           ` Daniel P. Berrangé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aCM-ECjLAPjr5ITz@redhat.com \
    --to=berrange@redhat.com \
    --cc=armbru@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=pierrick.bouvier@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).