From: Jason Gunthorpe <jgg@ziepe.ca>
To: Baolu Lu <baolu.lu@linux.intel.com>
Cc: Vasant Hegde <vasant.hegde@amd.com>,
"Tian, Kevin" <kevin.tian@intel.com>,
Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>,
"iommu@lists.linux.dev" <iommu@lists.linux.dev>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] iommu/vt-d: Fix missed device TLB cache tag
Date: Fri, 21 Jun 2024 09:58:04 -0300 [thread overview]
Message-ID: <20240621125804.GP791043@ziepe.ca> (raw)
In-Reply-To: <3d709185-2065-4cb8-9d69-a7a34edd249e@linux.intel.com>
On Fri, Jun 21, 2024 at 09:44:27AM +0800, Baolu Lu wrote:
> Enabling/Disabling ATS on domain attach seems like a feasible approach.
> The ATS requirement information (required/disallowed/neutral) could be
> included as an opt-in option in the domain attach path. This likely
> applies to PASID attachments and VF/PF devices. The iommu driver
> maintains the per-device ATS refcount and enables it for the first
> request and disables it after the last one. The attachment fails
> accordingly if the hardware capability doesn't match the domain attach
> requirement.
Yes. if we do this the core code would have to take some
responsibility to manage ATS and PASID needs together. It is a bit
tricky potentially, but probably better than having drivers repeat the
same logic.
But it probably does require the drivers actually implement hitless
replace. I'd imagin a core driven flow is something like:
- Install an identity domain without ATS
- Decide we want a SVA pasid
- Replace the identiy domain with the same identity domain and ATS
- Install the SVA pasid
(assuming we want some policy like only enable ATS when needed)
> Perhaps we could further include PRI as a domain attach option,
> indicating that the domain requires IOPF functionality. This would allow
> us to simplify the SVA and IOMMUFD by hiding device and IOMMU details
> within the IOMMU driver.
This is my desire, if the domain has a fault handler then the driver
should just make PRI work on attach or fail attach.
None of the weird feature stuff is needed. We are getting closer, I
think the SVA enable stuff is almost all NO-OP'd.
Jason
next prev parent reply other threads:[~2024-06-21 12:58 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-19 1:53 [PATCH 1/1] iommu/vt-d: Fix missed device TLB cache tag Lu Baolu
2024-06-19 16:46 ` Jason Gunthorpe
2024-06-20 0:50 ` Baolu Lu
2024-06-20 3:04 ` Tian, Kevin
2024-06-20 3:13 ` Baolu Lu
2024-06-20 3:57 ` Tian, Kevin
2024-06-20 6:04 ` Baolu Lu
2024-06-20 5:54 ` Vasant Hegde
2024-06-20 6:27 ` Baolu Lu
2024-06-20 10:49 ` Vasant Hegde
2024-06-20 14:08 ` Jason Gunthorpe
2024-06-21 1:44 ` Baolu Lu
2024-06-21 12:58 ` Jason Gunthorpe [this message]
2024-06-24 14:26 ` Vasant Hegde
2024-06-24 16:12 ` Jason Gunthorpe
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=20240621125804.GP791043@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=baolu.lu@linux.intel.com \
--cc=iommu@lists.linux.dev \
--cc=jacek.lawrynowicz@linux.intel.com \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=vasant.hegde@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