Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BD87DFED2F1 for ; Thu, 12 Mar 2026 08:52:28 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w0blt-0000fq-OB; Thu, 12 Mar 2026 04:51:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w0bls-0000fT-Ck for qemu-arm@nongnu.org; Thu, 12 Mar 2026 04:51:56 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w0blp-0003n6-RC for qemu-arm@nongnu.org; Thu, 12 Mar 2026 04:51:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773305511; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wE9sPJoS+PvsawByzPBkkoM8UixyCC0LDr4EX6fyKOg=; b=MxlqV8xJVk2FvcFJsAyqKuHazmaisl9YgToLDhmbe5OTxGg78cE7hid7GCNvuOZuQ6Ccwo zJkDZtihLokk7rWKaN0Hx/fo18qaJyCIBgipxjIrLuEbrPFGGX3nKYm6J/7DlcbgEWUgiA xjXAfUnB2RzWvJWVzwnQo0Qxc2Yhvqc= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-653-mJI_ME0RPHiOTyRa7gps7Q-1; Thu, 12 Mar 2026 04:51:50 -0400 X-MC-Unique: mJI_ME0RPHiOTyRa7gps7Q-1 X-Mimecast-MFC-AGG-ID: mJI_ME0RPHiOTyRa7gps7Q_1773305508 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-48532df52c5so6381525e9.1 for ; Thu, 12 Mar 2026 01:51:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773305508; x=1773910308; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:reply-to:user-agent:mime-version:date :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=wE9sPJoS+PvsawByzPBkkoM8UixyCC0LDr4EX6fyKOg=; b=RltMFmItlQkL5QvBhFJWrOYDTaPh+IgxyWhGgYBtKYcz9Iou4i7F5hYJaH4g1fQCrn 53BKvhO8oJ0RLhVI+b1NIz2F0aWTqZ3jMbGH9xlhwSSOzs2J56XdR9BDfs7hE7PB2SDo cMzz6e3MENbi7G4SmYuioOB+MJHQPHsTxv8ghBmgdETn4P0i0IJ2iF+zfV2bNz7BfNSj Qr7Px0vcpDSmWzl1ng55xIVtv6kPHD+xXnf/u63MWFan0beuPPUVIOy4hx3eimYldaIj WYKOnE8AabsaHWt7eiFTA+754PxBI5PTRgmsdSHJW9jNFKf+klp44L65E5Qw/FmXN/uB 2daQ== X-Forwarded-Encrypted: i=1; AJvYcCWczOgbWw1ty6iNN/KNmeFcJpexhhz+RN4O1p5tw4ofmjFGXcg4IU1/eDJIhTu2hYS7V86KiGOXbw==@nongnu.org X-Gm-Message-State: AOJu0YyWTzS+NBb+sJRvSDeZHxuCfrUM6MdsGgQ3DOm06kmSik4OeRZ5 jA+j80hjM7UahdPUzz/SoOhZ8Gbvzys9pPNn1S685cEZVBAuvzqDinaAAprKiC1w6XILHMgrGlw fhUeV2hHrqYbVPMbHUUOe/mxKerN++Sa2VdXfu14Rjl3LCTwYRp+2Yw== X-Gm-Gg: ATEYQzx12OEVDkQ8Hiie7VLJy80nTGRuTrutxGS0nLB/O0djfWDBHxcf4Y5Ua7OVJy2 5fC7sijBS1RgsKkFu36qR7ho1P0sq71WWigOtK/FkiM0caGMZ7sVxR/XEvP5xhPZKApzPkV6KYm 8TG+LcqSGob6RfAlcIcN6SrTB1wrFnbmX2aDqXqfVHVj80so0FUMgqyyenMCY74ebYL3GCQRmPJ DkaqPL1VWRS6FmQGawkp780dNQVieIuZ06h2EJPUw6kknmKTz0QrUDNJ4wW9Mr3DWvAgIVwVA8z mOeq+cEILOXCfK/zxwpPxt6UamDKtmaMiKC6jsOvgJ2Au1mEjO3Zi9PLHwdttJT+iW+ufp19lh+ rVP4NF64uPM/9Af2GPSCDikznck1teaiK+m9QT9tlh7dvY58tjCdeyaLRO+9RCceXpIkejg== X-Received: by 2002:a05:6000:604:b0:439:df0b:2885 with SMTP id ffacd0b85a97d-439f8225415mr9836529f8f.58.1773305508129; Thu, 12 Mar 2026 01:51:48 -0700 (PDT) X-Received: by 2002:a05:6000:604:b0:439:df0b:2885 with SMTP id ffacd0b85a97d-439f8225415mr9836486f8f.58.1773305507686; Thu, 12 Mar 2026 01:51:47 -0700 (PDT) Received: from ?IPV6:2a01:e0a:f0e:9070:527b:9dff:feef:3874? ([2a01:e0a:f0e:9070:527b:9dff:feef:3874]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-439fdf09abesm6148793f8f.0.2026.03.12.01.51.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 12 Mar 2026 01:51:47 -0700 (PDT) Message-ID: Date: Thu, 12 Mar 2026 09:51:45 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH 2/8] hw/arm/smmuv3-accel: Introduce _AUTO support for ATS To: Markus Armbruster Cc: Nathan Chen , qemu-devel@nongnu.org, qemu-arm@nongnu.org, Yi Liu , Zhenzhong Duan , Peter Maydell , Shannon Zhao , "Michael S . Tsirkin" , Igor Mammedov , Ani Sinha , Paolo Bonzini , =?UTF-8?Q?Daniel_P=2EBerrang=C3=A9?= , Alex Williamson , =?UTF-8?Q?C=C3=A9dric_Le_Goater?= , Eric Blake References: <20260309192119.870186-1-nathanc@nvidia.com> <20260309192119.870186-3-nathanc@nvidia.com> <87pl5cnp06.fsf@pond.sub.org> <98e7dd71-6669-4a82-bec8-f1dae2d861c3@redhat.com> <0bdcf7d7-136e-42f4-9fa9-d31f6ae6e19f@nvidia.com> <87o6ktxwzn.fsf@pond.sub.org> From: Eric Auger In-Reply-To: <87o6ktxwzn.fsf@pond.sub.org> X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: bUZKK1oth-kWJGoWEKDPczTsRfQPfOr6TdfC00xQcoQ_1773305508 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=170.10.129.124; envelope-from=eric.auger@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: eric.auger@redhat.com Errors-To: qemu-arm-bounces+qemu-arm=archiver.kernel.org@nongnu.org Sender: qemu-arm-bounces+qemu-arm=archiver.kernel.org@nongnu.org On 3/12/26 9:39 AM, Markus Armbruster wrote: > Eric Auger 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 writes: >>>>> >>>>>> From: Nathan Chen >>>>>> >>>>>> 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 > [...] > >>>>>> 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? those options were introduced in qemu 11.0. Fixing them in -rc is still an option but it is a very tight schedule Thanks Eric  > > 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. >