qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Collin Walling <walling@linux.ibm.com>,
	Markus Armbruster <armbru@redhat.com>
Cc: qemu-s390x@nongnu.org, qemu-devel@nongnu.org, thuth@redhat.com,
	wangyanan55@huawei.com, philmd@linaro.org,
	marcel.apfelbaum@gmail.com, eduardo@habkost.net,
	Jiri Denemark <jdenemar@redhat.com>
Subject: Re: [PATCH v3] target/s390x: filter deprecated properties based on model expansion type
Date: Fri, 26 Jul 2024 21:54:01 +0200	[thread overview]
Message-ID: <3956a1ff-d036-4ef8-b1b3-7380933f49f6@redhat.com> (raw)
In-Reply-To: <474aa180-431d-4724-945d-8e7dc4b91228@linux.ibm.com>

On 26.07.24 21:11, Collin Walling wrote:
> On 7/26/24 3:15 AM, Markus Armbruster wrote:
>> Collin Walling <walling@linux.ibm.com> writes:
>>
>>> On 7/25/24 3:39 AM, David Hildenbrand wrote:
>>>> On 25.07.24 09:35, Markus Armbruster wrote:
>>>>> Markus Armbruster <armbru@redhat.com> writes:
>>
>> [...]
>>
>>>>>> Arguments that are silently ignored is bad interface design.
>>>>>>
>>>>>> Observe: when CpuModelInfo is an argument, @deprecated-props is always
>>>>>> ignored.  When it's a return value, absent means {}, and it can be
>>>>>> present only for certain targets (currently S390).
>>>>>>
>>>>>> The reason we end up with an argument we ignore is laziness: we use the
>>>>>> same type for both roles.  We can fix that easily:
>>>>>>
>>>>>>       { 'struct': 'CpuModel',
>>>>>>         'data': { 'name': 'str',
>>>>>>                   '*props': 'any' } }
>>>>>>
>>>>>>       { 'struct': 'CpuModelInfo',
>>>>>>         'base': 'CpuModel',
>>>>>>         'data': { '*deprecated-props': ['str'] } }
>>>>>>
>>>>>> Use CpuModel for arguments, CpuModelInfo for return values.
>>>>>>
>>>>>> Since @deprecated-props is used only by some targets, I'd make it
>>>>>> conditional, i.e. 'if': 'TARGET_S390X'.
>>>>>
>>>>> If we want just query-cpu-model-expansion return deprecated properties,
>>>>> we can instead move @deprecated-props from CpuModelInfo to
>>>>> CpuModelExpansionInfo.
>>>>
>>>> That might a bit more sense, because deprecated-props does not make any
>>>> sense as input parameter, for example.
>>>
>>> Will do.  Thanks for the feedback.  v4 in the works.
>>
>> We better get this into 9.1.  Plan B: mark @deprecated-props unstable to
>> avoid backward compatibility pain.
>>
>>
> 
> Agreed, it would go a long way to squeeze this in before things get too
> messy.
> 
> v4 is posted.  I think Thomas is unavailable, so if @David would not
> mind handling this?

Will do!

-- 
Cheers,

David / dhildenb



      reply	other threads:[~2024-07-26 19:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-19 18:17 [PATCH v3] target/s390x: filter deprecated properties based on model expansion type Collin Walling
2024-07-20  5:33 ` Markus Armbruster
2024-07-22 14:50   ` Collin Walling
2024-07-23  9:23     ` Thomas Huth
2024-07-23 12:46       ` Collin Walling
2024-07-24  7:56     ` Markus Armbruster
2024-07-24 19:42       ` Collin Walling
2024-07-25  6:24         ` Markus Armbruster
2024-07-25  7:35           ` Markus Armbruster
2024-07-25  7:39             ` David Hildenbrand
2024-07-25 17:22               ` Collin Walling
2024-07-26  7:15                 ` Markus Armbruster
2024-07-26 19:11                   ` Collin Walling
2024-07-26 19:54                     ` David Hildenbrand [this message]

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=3956a1ff-d036-4ef8-b1b3-7380933f49f6@redhat.com \
    --to=david@redhat.com \
    --cc=armbru@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=jdenemar@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=thuth@redhat.com \
    --cc=walling@linux.ibm.com \
    --cc=wangyanan55@huawei.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).