qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Pierrick Bouvier <pierrick.bouvier@linaro.org>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org, michael.roth@amd.com, thuth@redhat.com,
	pbonzini@redhat.com, richard.henderson@linaro.org,
	peter.maydell@linaro.org, berrange@redhat.com, philmd@linaro.org
Subject: Re: [PATCH v4 08/15] qapi: Make CpuModelExpansionInfo::deprecated-props optional and generic
Date: Tue, 27 May 2025 10:04:42 -0700	[thread overview]
Message-ID: <a856a963-4bd5-4cb0-9ac5-6e18316f3279@linaro.org> (raw)
In-Reply-To: <87bjreqofz.fsf@pond.sub.org>

On 5/27/25 4:32 AM, Markus Armbruster wrote:
> Pierrick Bouvier <pierrick.bouvier@linaro.org> 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. This is not a compatibility break only because the field
>> remains present always on S390x.
>>
>> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@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 426ce4ee82d..d8dbda4b508 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' : ['str'] },
>>     'if': { 'any': [ 'TARGET_S390X',
>>                      'TARGET_I386',
>>                      'TARGET_ARM',
> 
> [Copied from review of prior posts]
> 
> 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?
> 
> Daniel doubts it is.
> 
> [end of copy]
> 
> Let's take with this patch as is.  If we prefer to remove the
> difference, we can do so on top.
> 

I didn't answer to this question because I have no opinion on it.
If I have to pick an answer, following Daniel, I doubt the difference is 
useful also, as it's not changing anything for s390, which is the only 
producer for this entry.

Thanks,
Pierrick


  reply	other threads:[~2025-05-27 17:05 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-22 19:05 [PATCH v4 00/15] qapi: remove all TARGET_* conditionals from the schema Pierrick Bouvier
2025-05-22 19:05 ` [PATCH v4 01/15] qapi: expose rtc-reset-reinjection command unconditionally Pierrick Bouvier
2025-05-22 19:05 ` [PATCH v4 02/15] qapi: expand docs for SEV commands Pierrick Bouvier
2025-05-27 11:26   ` Markus Armbruster
2025-05-27 16:54     ` Pierrick Bouvier
2025-05-28  6:01       ` Markus Armbruster
2025-05-28 18:38         ` Pierrick Bouvier
2025-05-27 12:47   ` Markus Armbruster
2025-05-22 19:05 ` [PATCH v4 03/15] qapi: make SEV commands unconditionally available Pierrick Bouvier
2025-05-22 19:05 ` [PATCH v4 04/15] qapi: expose query-gic-capability command unconditionally Pierrick Bouvier
2025-05-22 19:05 ` [PATCH v4 05/15] qapi: make SGX commands unconditionally available Pierrick Bouvier
2025-05-22 19:05 ` [PATCH v4 06/15] qapi: make Xen event " Pierrick Bouvier
2025-05-22 19:05 ` [PATCH v4 07/15] qapi: remove the misc-target.json file Pierrick Bouvier
2025-05-22 19:05 ` [PATCH v4 08/15] qapi: Make CpuModelExpansionInfo::deprecated-props optional and generic Pierrick Bouvier
2025-05-27 11:32   ` Markus Armbruster
2025-05-27 17:04     ` Pierrick Bouvier [this message]
2025-05-22 19:05 ` [PATCH v4 09/15] qapi: make most CPU commands unconditionally available Pierrick Bouvier
2025-05-27 11:38   ` Markus Armbruster
2025-05-27 16:56     ` Pierrick Bouvier
2025-05-28  4:56       ` Markus Armbruster
2025-05-22 19:05 ` [PATCH v4 10/15] qapi: make s390x specific " Pierrick Bouvier
2025-05-26  6:07   ` Thomas Huth
2025-05-22 19:05 ` [PATCH v4 11/15] qapi: remove qapi_specific_outputs from meson.build Pierrick Bouvier
2025-05-22 19:05 ` [PATCH v4 12/15] qapi: make all generated files common Pierrick Bouvier
2025-05-22 19:05 ` [PATCH v4 13/15] qapi: use imperative style in documentation Pierrick Bouvier
2025-05-27 11:12   ` Markus Armbruster
2025-05-27 16:57     ` Pierrick Bouvier
2025-05-22 19:05 ` [PATCH v4 14/15] qapi/misc-i386: s/field will be set/field is set/ Pierrick Bouvier
2025-05-27 11:17   ` Markus Armbruster
2025-05-22 19:05 ` [PATCH v4 15/15] qapi/misc-i386: move errors to their own documentation section Pierrick Bouvier
2025-05-27 11:20   ` Markus Armbruster
2025-05-27 16:58     ` Pierrick Bouvier
2025-05-28  4:59       ` Markus Armbruster
2025-05-28 19:00         ` Pierrick Bouvier
2025-05-27 12:57   ` Markus Armbruster
2025-05-27 13:00 ` [PATCH v4 00/15] qapi: remove all TARGET_* conditionals from the schema Markus Armbruster
2025-05-27 16:51   ` Pierrick Bouvier
2025-05-28  5:01     ` Markus Armbruster

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=a856a963-4bd5-4cb0-9ac5-6e18316f3279@linaro.org \
    --to=pierrick.bouvier@linaro.org \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=michael.roth@amd.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=thuth@redhat.com \
    /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).