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 9C9E4EDEC1B for ; Wed, 4 Mar 2026 07:48:09 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vxgxF-0002Xl-8f; Wed, 04 Mar 2026 02:47:37 -0500 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 1vxgxD-0002XV-EA for qemu-arm@nongnu.org; Wed, 04 Mar 2026 02:47:35 -0500 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 1vxgxB-0001w7-H0 for qemu-arm@nongnu.org; Wed, 04 Mar 2026 02:47:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772610452; 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=ZvUPKYkxpX6p5uo9rCWImCxrWe8EsHHLUaB5/uPujno=; b=TsJlhJ9wxaha8Rqowe9FMKeXdgSySfhSN2AIViqQLAm02YLG5CgbGR+csPUxs3t95joVXy Ozmhw4ZQYguc0g01ZIwPmP4n1WJeYYYh0dZTy8PatX/+Lww0BXJR4LgzP/Zzk5p95M/Ndn hQ/NRIvixeuCl+5soBvDoeDiebNi4FM= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-241-ryI3bhOPNAWK4tbEBPqC3Q-1; Wed, 04 Mar 2026 02:47:31 -0500 X-MC-Unique: ryI3bhOPNAWK4tbEBPqC3Q-1 X-Mimecast-MFC-AGG-ID: ryI3bhOPNAWK4tbEBPqC3Q_1772610450 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-48069a43217so62225595e9.1 for ; Tue, 03 Mar 2026 23:47:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772610450; x=1773215250; 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=ZvUPKYkxpX6p5uo9rCWImCxrWe8EsHHLUaB5/uPujno=; b=QNkssnT/W2u80Kpe2xhhb3Deao+clj0fWyzV4/hNoYICPtEjtKWlah/HsibuYSeCHu sanhERNGyzPuy66UT3CUFWGYyvL7F2//ldLgcz5k3Gu3xKUw8R0Dth44PCmmjKk/YrCj PW3q/8U7U7vZm3hE4i/MFE4fzJtPzewbobU2a8EwaMCgAhOtasScIpSE0usHfgwqmO8S L/1HhDx3ati4MpWWi3Xj1UcnbfMDiLPRANH5xPU5DoIeAonoRpuATOQ+42e5uGYzQiGA fH5rgVuuPxAaAZOVCK0zOAON+RbCLxzyAbGMRcssPf5OWlBaY0g50WMHqosenRl/er2X X/Uw== X-Gm-Message-State: AOJu0YyRGCeTpyXYQnxTACmVoZF84VmbCUW5Jw8fIoQAOtvwUJ4Z+duP p2CoJI0VxF3Zg4tyKkGfc8JJynP8vaRrdiRHd8zoHRj6S4zUQtYod7g0sIp8q9dkSZUfVHVZzjb 0nFCf4h8oiAL7G2YhowS94Sk8RJDKZlQCvDIu9lLVK/RJoZhNgap+bw== X-Gm-Gg: ATEYQzzvtVl5i4wATNgcgAJegXeNjueAfXfXXj/uW0WfIrUw5zjR+ow4Kb6mTbBvswz lzg7W3C85i5EMJzbTk8MdCp2Ph5sXD4/FyZWSW/s23mVAY9X0ysy7Wzy4wD/QChPX1Retq0NHB2 fJAESPfXnNG/MW3qq/lqlVhiyTbZ0zP6H+NXtp55dG2cngliP12PVgSL59fNx8IPAqUxPYTTvwf qSd8CoJC06lagNwuO3/2mz338p3VJMWedfKMYcT8/zPS9PaEhbJ4PcvgTk3T+DPS5srN2Ie/0Gv rn0p9a+GzoUi8xeHZtR4EsWSmNl/kBuGhI4L5Pbgvo41mPCUNrwAiAH5494eMrWlkKyfmxSa9v3 IfzHIEdSDjB1HJED+sHW1C5YJ9yBRwe4vPLGjBCiW//1OOk/Psxdd9WvQNFLS+ot3w0ytPA== X-Received: by 2002:a05:600c:620f:b0:477:7b16:5f9f with SMTP id 5b1f17b1804b1-485198a2bcfmr14417365e9.31.1772610449821; Tue, 03 Mar 2026 23:47:29 -0800 (PST) X-Received: by 2002:a05:600c:620f:b0:477:7b16:5f9f with SMTP id 5b1f17b1804b1-485198a2bcfmr14416935e9.31.1772610449335; Tue, 03 Mar 2026 23:47:29 -0800 (PST) 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 5b1f17b1804b1-4851a8a9542sm9494755e9.1.2026.03.03.23.47.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 03 Mar 2026 23:47:28 -0800 (PST) Message-ID: <41aaf959-b417-469e-89aa-41c20a4b906c@redhat.com> Date: Wed, 4 Mar 2026 08:47:26 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v9 31/37] hw/arm/smmuv3-accel: Add property to specify OAS bits To: Shameer Kolothum Thodi , Jason Gunthorpe , Pavel Hrdina Cc: "qemu-arm@nongnu.org" , "qemu-devel@nongnu.org" , "peter.maydell@linaro.org" , Nicolin Chen , "ddutile@redhat.com" , "berrange@redhat.com" , "clg@redhat.com" , "alex@shazbot.org" , Nathan Chen , Matt Ochs , "smostafa@google.com" , "wangzhou1@hisilicon.com" , "jiangkunkun@huawei.com" , "jonathan.cameron@huawei.com" , "zhangfei.gao@linaro.org" , "zhenzhong.duan@intel.com" , "yi.l.liu@intel.com" , Krishnakant Jaju References: <20260126104342.253965-1-skolothumtho@nvidia.com> <20260126104342.253965-32-skolothumtho@nvidia.com> <20260202151917.GO2223369@nvidia.com> <20260202160000.GR2223369@nvidia.com> From: Eric Auger In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: cQTEN0InjhpltzwacFl_6bXtHpRla0WHVLT1W6pxkWQ_1772610450 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: -5 X-Spam_score: -0.6 X-Spam_bar: / X-Spam_report: (-0.6 / 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.322, RCVD_IN_VALIDITY_SAFE_BLOCKED=1.141, 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 Hi Shameer, On 2/10/26 4:12 PM, Shameer Kolothum Thodi wrote: > Hi Eric, > >> -----Original Message----- >> From: Shameer Kolothum Thodi >> Sent: 02 February 2026 16:04 >> To: Jason Gunthorpe >> Cc: eric.auger@redhat.com; qemu-arm@nongnu.org; qemu- >> devel@nongnu.org; peter.maydell@linaro.org; Nicolin Chen >> ; ddutile@redhat.com; berrange@redhat.com; >> clg@redhat.com; alex@shazbot.org; Nathan Chen ; >> Matt Ochs ; smostafa@google.com; >> wangzhou1@hisilicon.com; jiangkunkun@huawei.com; >> jonathan.cameron@huawei.com; zhangfei.gao@linaro.org; >> zhenzhong.duan@intel.com; yi.l.liu@intel.com; Krishnakant Jaju >> >> Subject: RE: [PATCH v9 31/37] hw/arm/smmuv3-accel: Add property to >> specify OAS bits >> >> >> >>> -----Original Message----- >>> From: Jason Gunthorpe >>> Sent: 02 February 2026 16:00 >>> To: Shameer Kolothum Thodi >>> Cc: eric.auger@redhat.com; qemu-arm@nongnu.org; qemu- >>> devel@nongnu.org; peter.maydell@linaro.org; Nicolin Chen >>> ; ddutile@redhat.com; berrange@redhat.com; >>> clg@redhat.com; alex@shazbot.org; Nathan Chen ; >>> Matt Ochs ; smostafa@google.com; >>> wangzhou1@hisilicon.com; jiangkunkun@huawei.com; >>> jonathan.cameron@huawei.com; zhangfei.gao@linaro.org; >>> zhenzhong.duan@intel.com; yi.l.liu@intel.com; Krishnakant Jaju >>> >>> Subject: Re: [PATCH v9 31/37] hw/arm/smmuv3-accel: Add property to >>> specify OAS bits >>> >>> On Mon, Feb 02, 2026 at 03:38:50PM +0000, Shameer Kolothum Thodi >>> wrote: >>> >>>>> We can treat ATS as a per-PCIe device property.. I think it would >>>>> be fine to tell the SMMU that it always has ATS support, it will >>>>> never do anything with it unless it sees a PCIe device with an ATS >>>>> cap, and the physical STE generated by the hypervisor should sanitize the >> EATS. >>>>> BIOS overriding it should be reflected as the devices being >>>>> reported as not supporting ATS, qemu should have a per-device flag >>>>> to disable ATS. >>>> Do we have way to detect that(IOMMU_FWSPEC_PCI_RC_ATS) from >>>> userspace now? >>> I don't think so.. I was describing how I suspect that should work. >>> >>> The iommu driver is the only entity that decides if ATS should be >>> enabled per-device, so it should report back to userspace in iommufd >>> if the device is allowed to enable ATS or not. That should roll up any >>> FW overrides and the PCI cap block. >> Right. May be just like the out_max_pasid_log2. Will take a look. > Looking at adding the ATS detection support through iommufd, one > idea is to extend the enum iommufd_hw_capabilities with > IOMMU_HW_CAP_PCI_ATS_NOT_SUPPORTED. The question I have > now is whether we need to differentiate an old kernel which doesn't > have this support or not. > > This is how the usage would look with an added "ats" property on the > vfio-pci device: > > -device vfio-pci,...,ats=on > if ATS_NOT_SUPPORTED then reject > -device vfio-pci,...,ats=off > keep ATS off > -device vfio-pci,...,ats=auto (default) > if ATS_NOT_SUPPORTED, disable ATS > otherwise, enable ATS if the PCIe ATS capability is present > (this also covers behaviour on older kernels) > > Does the above make sense? Do you have plans wrt the migration to auto properties for the various vSMMU properties (RIL, ssidsize, OAS, ATS)? I just would like to make sure libvirt integrators take this new design into account. Please let me know if some help is needed for the conversion of some of the properties? Thanks Eric > > Thanks, > Shameer >