All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Collin Walling <walling@linux.ibm.com>
Cc: David Hildenbrand <david@redhat.com>,
	 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 09:15:57 +0200	[thread overview]
Message-ID: <87ed7gipxu.fsf@pond.sub.org> (raw)
In-Reply-To: <fa452b18-d19c-4d00-a566-3ec82d53b153@linux.ibm.com> (Collin Walling's message of "Thu, 25 Jul 2024 13:22:26 -0400")

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.



  reply	other threads:[~2024-07-26  7:16 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 [this message]
2024-07-26 19:11                   ` Collin Walling
2024-07-26 19:54                     ` David Hildenbrand

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=87ed7gipxu.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=david@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.