All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Eric Auger <eric.auger@redhat.com>
Cc: "Nathan Chen" <nathanc@nvidia.com>,
	qemu-devel@nongnu.org, qemu-arm@nongnu.org,
	"Yi Liu" <yi.l.liu@intel.com>,
	"Zhenzhong Duan" <zhenzhong.duan@intel.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Shannon Zhao" <shannon.zhaosl@gmail.com>,
	"Michael S . Tsirkin" <mst@redhat.com>,
	"Igor Mammedov" <imammedo@redhat.com>,
	"Ani Sinha" <anisinha@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Daniel P.Berrangé" <berrange@redhat.com>,
	"Alex Williamson" <alex@shazbot.org>,
	"Cédric Le Goater" <clg@redhat.com>,
	"Eric Blake" <eblake@redhat.com>
Subject: Re: [RFC PATCH 2/8] hw/arm/smmuv3-accel: Introduce _AUTO support for ATS
Date: Thu, 12 Mar 2026 09:39:24 +0100	[thread overview]
Message-ID: <87o6ktxwzn.fsf@pond.sub.org> (raw)
In-Reply-To: <fd34b7a2-65ac-486f-bc17-23dd4f96a3df@redhat.com> (Eric Auger's message of "Wed, 11 Mar 2026 18:16:09 +0100")

Eric Auger <eric.auger@redhat.com> writes:

> On 3/11/26 6:08 PM, Nathan Chen wrote:
>>
>>
>> On 3/11/2026 8:31 AM, Eric Auger wrote:
>>> On 3/10/26 8:05 AM, Markus Armbruster wrote:
>>>> Nathan Chen<nathanc@nvidia.com> writes:
>>>>
>>>>> From: Nathan Chen<nathanc@nvidia.com>
>>>>>
>>>>> Allow accelerated SMMUv3 Address Translation Services support property
>>>>> to be derived from host IOMMU capabilities. Derive host values using
>>>>> IOMMU_GET_HW_INFO, retrieving ATS capability from IDR0.
>>>>>
>>>>> Set the default value of ATS to auto. The default for ATS support used
>>>>> to be set to off, but we change it to match what the host IOMMU
>>>>> properties report.
>>>>>
>>>>> Add a "ats-enabled" read-only property for smmuv3 to address an
>>>>> expected bool for the "ats" property in iort_smmuv3_devices().
>>>>>
>>>>> Signed-off-by: Nathan Chen<nathanc@nvidia.com>

[...]

>>>>> diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c
>>>>> index 068108e49b..197ba7c77b 100644
>>>>> --- a/hw/arm/smmuv3.c
>>>>> +++ b/hw/arm/smmuv3.c

[...]

>>>>> @@ -2128,7 +2134,7 @@ static const Property smmuv3_properties[] = {
>>>>>      DEFINE_PROP_UINT64("msi-gpa", SMMUv3State, msi_gpa, 0),
>>>>>      /* RIL can be turned off for accel cases */
>>>>>      DEFINE_PROP_BOOL("ril", SMMUv3State, ril, true),
>>>>> -    DEFINE_PROP_BOOL("ats", SMMUv3State, ats, false),
>>>>> +    DEFINE_PROP_ON_OFF_AUTO("ats", SMMUv3State, ats, ON_OFF_AUTO_AUTO),
>>>>
>>>> Is property "ats" accessible via QMP or JSON command line?  If yes,
>>>> this
>>>> is an incompatible change: JSON values false and true no longer work.
>>> So what do you recommend to extend the property values. I guess we had
>>> some existing scenarios happening in the past. What is the best way to
>>> proceed?
>>
>> Is it a requirement to ensure boolean values are still supported when
>> switching to OnOffAuto? I found that the x86-iommu intremap property
>> had a change from DEFINE_PROP_BOOL to DEFINE_PROP_ON_OFF_AUTO [0].

We promise to follow a certain process when changing external
interfaces: docs/about/deprecated.rst.

This is why I inquired about external access.  No external access, no
compatibility worries.

I specifically asked about JSON, because going from bool to OnOffAuto is
mostly compatible in key=value syntax: values "on" and "off" keep
working.

Mostly compatible, because qapi_bool_parse() also recognizes "yes",
"true", "y", "no", "false", and "n" for convenience, and these stop
working.  We have a knack for inventing convenience features that later
bite us.

JSON breaks entirely, of course: all values stop working.

Even with external access, compatibility worries start only after we
shipped the interface in a release.  Did we?

If the interface was released, we should keep our promise to follow the
process.  From time to time, that's so onerous and we're so certain that
nobody actually cares, we bend the rules.  This should not be done
lightly.

>> Should I add a custom property setter that accepts both boolean and
>> on/off/auto for backward compatibility, or is following the intremap
>> precedent acceptable? I'm happy to implement either approach.
>>
>> [0]
>> https://github.com/qemu/qemu/commit/a924b3d8df55a395891fd5ed341d0deb135d9aa6 
>
> Maybe we also need to emphasize that libvirt integration is still under
> work (and waiting for that conversion to happen at qemu level). So do we
> really care about keeping the compat wrt QMP and JSON. 

I can explain our promise and the process to you, but I can't make the
decision to bend the rules for you.



  parent reply	other threads:[~2026-03-12  8:40 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-09 19:21 [RFC PATCH 0/8] hw/arm/smmuv3-accel: Support AUTO properties Nathan Chen
2026-03-09 19:21 ` [RFC PATCH 1/8] hw/arm/smmuv3-accel: Add helper for resolving auto parameters Nathan Chen
2026-03-10  7:00   ` Markus Armbruster
2026-03-10  9:01     ` Shameer Kolothum Thodi
2026-03-12  8:20       ` Markus Armbruster
2026-03-12  8:33         ` Shameer Kolothum Thodi
2026-03-12  8:39           ` Cédric Le Goater
2026-03-12  8:44             ` Shameer Kolothum Thodi
2026-03-10  7:42   ` Cédric Le Goater
2026-03-10  8:40     ` Shameer Kolothum Thodi
2026-03-12  8:37       ` Cédric Le Goater
2026-03-12  9:29         ` Shameer Kolothum Thodi
2026-03-10 17:13     ` Nathan Chen
2026-03-09 19:21 ` [RFC PATCH 2/8] hw/arm/smmuv3-accel: Introduce _AUTO support for ATS Nathan Chen
2026-03-10  7:05   ` Markus Armbruster
2026-03-10 17:35     ` Nathan Chen
2026-03-11 15:31     ` Eric Auger
2026-03-11 17:08       ` Nathan Chen
2026-03-11 17:16         ` Eric Auger
2026-03-11 18:09           ` Pavel Hrdina
2026-03-12  8:39           ` Markus Armbruster [this message]
2026-03-12  8:51             ` Eric Auger
2026-03-12  9:20               ` Markus Armbruster
2026-03-12  9:25                 ` Eric Auger
2026-03-12 16:35                   ` Nathan Chen
2026-03-12  8:52             ` Eric Auger
2026-03-11 17:24         ` Eric Auger
2026-03-11 17:46   ` Eric Auger
2026-03-11 17:53     ` Nathan Chen
2026-03-11 18:10   ` Eric Auger
2026-03-11 18:21     ` Nathan Chen
2026-03-09 19:21 ` [RFC PATCH 3/8] vfio/pci: Add ats property and mask ATS cap when not exposed Nathan Chen
2026-03-09 19:21 ` [RFC PATCH 4/8] hw/arm/smmuv3-accel: Introduce _AUTO support for RIL Nathan Chen
2026-03-10  7:06   ` Markus Armbruster
2026-03-09 19:21 ` [RFC PATCH 5/8] qdev: Add a SsidSizeMode property Nathan Chen
2026-03-10  7:14   ` Markus Armbruster
2026-03-09 19:21 ` [RFC PATCH 6/8] hw/arm/smmuv3-accel: Introduce _AUTO support for SSID size Nathan Chen
2026-03-10  7:21   ` Markus Armbruster
2026-03-10 17:44     ` Nathan Chen
2026-03-09 19:21 ` [RFC PATCH 7/8] qdev: Add an OasMode property Nathan Chen
2026-03-11 18:20   ` Eric Auger
2026-03-11 18:24     ` Nathan Chen
2026-03-12  9:29       ` Eric Auger
2026-03-12 16:32         ` Nathan Chen
2026-03-09 19:21 ` [RFC PATCH 8/8] hw/arm/smmuv3-accel: Introduce _AUTO support for OAS Nathan Chen
2026-03-10  7:23   ` Markus Armbruster
2026-03-11 17:43 ` [RFC PATCH 0/8] hw/arm/smmuv3-accel: Support AUTO properties Eric Auger
2026-03-11 17:55   ` Nathan Chen
2026-03-11 18:25     ` Eric Auger

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=87o6ktxwzn.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=alex@shazbot.org \
    --cc=anisinha@redhat.com \
    --cc=berrange@redhat.com \
    --cc=clg@redhat.com \
    --cc=eblake@redhat.com \
    --cc=eric.auger@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=mst@redhat.com \
    --cc=nathanc@nvidia.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=shannon.zhaosl@gmail.com \
    --cc=yi.l.liu@intel.com \
    --cc=zhenzhong.duan@intel.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.