From: Yi Liu <yi.l.liu@intel.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: "Tian, Kevin" <kevin.tian@intel.com>,
Lu Baolu <baolu.lu@linux.intel.com>,
Bjorn Helgaas <bhelgaas@google.com>,
David Woodhouse <dwmw2@infradead.org>,
"iommu@lists.linux.dev" <iommu@lists.linux.dev>,
Joerg Roedel <joro@8bytes.org>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
"Suravee Suthikulpanit" <suravee.suthikulpanit@amd.com>,
Will Deacon <will@kernel.org>,
"patches@lists.linux.dev" <patches@lists.linux.dev>
Subject: Re: [PATCH] iommu: Allow ATS to work on VFs when the PF uses IDENTITY
Date: Tue, 13 Aug 2024 11:00:43 +0800 [thread overview]
Message-ID: <77197bcb-574e-4f46-87b5-1b1fe4a75e7f@intel.com> (raw)
In-Reply-To: <20240812113555.GP8378@nvidia.com>
On 2024/8/12 19:35, Jason Gunthorpe wrote:
> On Mon, Aug 12, 2024 at 05:03:37PM +0800, Yi Liu wrote:
>
>>> The PASID may require ATS to be enabled (ie SVA), but the RID may be
>>> IDENTITY for performance. The poor device has no idea it is not
>>> allowed to use ATS on the RID side :(
>>
>> If this is the only problematic case, the intel iommu driver in this
>> patch could check the scalable mode before enabling ATS in the
>> probe_device() op. In this way, the legacy mode iommu would keep the old
>> ATS enable policy.
>
> At some point we will need to address this.. At least when we add
> PASID support to mlx5 it will need something since mlx5 is using ATS
> on the RID right now.
>
> Supporting ATS with the IDENTITY optimization is a good idea in the
> IOMMU HW. The HW just has to answer the ATS with a 1:1 TA.
looks like Intel scalable mode would allow ATS work even device uses
IDENTITY. Below is what spec says when PGTT is PT.
Chapter 9.6:
Untranslated/Translation Requests (with or without PASID) referencing this
scalable-mode PASID Table Entry bypass address translation and are
processed as pass-through.
> Next, telling the driver that ATS is enabled but doesn't work on the
> RID would allow the driver to deal with it
>
> Finally, doing things like using IDENTITY through a paging domain
> would be a last resort for troubled devices.
yep. It's another issue then.
--
Regards,
Yi Liu
next prev parent reply other threads:[~2024-08-13 2:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-07 18:19 [PATCH] iommu: Allow ATS to work on VFs when the PF uses IDENTITY Jason Gunthorpe
2024-08-09 2:36 ` Tian, Kevin
2024-08-09 13:28 ` Jason Gunthorpe
2024-08-12 0:09 ` Tian, Kevin
2024-08-12 9:03 ` Yi Liu
2024-08-12 11:35 ` Jason Gunthorpe
2024-08-13 3:00 ` Yi Liu [this message]
2024-08-09 19:10 ` Bjorn Helgaas
2024-08-12 2:20 ` Baolu Lu
2024-08-13 3:11 ` Yi Liu
2024-08-13 12:30 ` Jason Gunthorpe
2024-08-13 23:21 ` Yi Liu
2024-08-13 8:52 ` Joerg Roedel
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=77197bcb-574e-4f46-87b5-1b1fe4a75e7f@intel.com \
--to=yi.l.liu@intel.com \
--cc=baolu.lu@linux.intel.com \
--cc=bhelgaas@google.com \
--cc=dwmw2@infradead.org \
--cc=iommu@lists.linux.dev \
--cc=jgg@nvidia.com \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=patches@lists.linux.dev \
--cc=robin.murphy@arm.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=will@kernel.org \
/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