[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240826135955.GI3468552@ziepe.ca>
Date: Mon, 26 Aug 2024 10:59:55 -0300
From: Jason Gunthorpe <jgg@...pe.ca>
To: Klaus Jensen <its@...elevant.dk>
Cc: David Woodhouse <dwmw2@...radead.org>,
Lu Baolu <baolu.lu@...ux.intel.com>, Joerg Roedel <joro@...tes.org>,
Will Deacon <will@...nel.org>, Robin Murphy <robin.murphy@....com>,
Kevin Tian <kevin.tian@...el.com>,
Minwoo Im <minwoo.im@...sung.com>, linux-kernel@...r.kernel.org,
iommu@...ts.linux.dev, Joel Granados <j.granados@...sung.com>,
Klaus Jensen <k.jensen@...sung.com>
Subject: Re: [PATCH RFC PREVIEW 0/6] iommu: enable user space iopfs in
non-nested and non-svm cases
On Mon, Aug 26, 2024 at 01:40:26PM +0200, Klaus Jensen wrote:
> This is a Request for Comment series that will hopefully generate
> initial feedback on the use of the iommufd_hwpt_replace_device to
> execute non-nested and non-svm user space IOPFs. Our main motivation is
> to enable user-space driver driven device verification with default
> pasid and without nesting nor SVM.
>
> What?
> * Enable IO page fault handling in user space in a non-nested, non-svm
> and non-virtualised use case.
> * Removing the relation between IOPF and INTEL_IOMMU_SVM by allowing
> the user to (de)select the IOPF code through Kconfig.
> * Create a new file under iommu/intel (prq.c) that contains all the
> page request queue related logic and is not under intel/svm.c.
> * Add the IOMMU_HWPT_FAULT_ID_VALID to the valid flags used to create
> IOMMU_HWPT_ALLOC allocations.
> * Create a default (zero) pasid handle and insert it to the pasid
> array within the dev->iommu_group when replacing the old HWPT with
> an iopf enabled HWPT.
>
> Why?
> The PCI ATS Extended Capability allows peripheral devices to
> participate in the caching of translations when operating under an
> IOMMU. Further, the ATS Page Request Interface (PRI) Extension allows
> devices to handle missing mappings. Currently, PRI is mainly used in
> the context of Shared Virtual Addressing, requiring support for the
> Process Address Space Identifier (PASID) capability, but other use
> cases such as enabling user-space driver driven device verification
> and reducing memory pinning exists. This patchest sets out to enable
> these use cases.
I definitely expect PRI to work outside PASID and SVA cases, so this
is going in a good direction
> Supplementary repositories supporting this patchset:
> 1. A user space library libvfn [1] which is used for testing and
> verification (see examples/iopf.c), and
That's pretty neat, I've been wanting to see some kind of IOMMU test
suite based around a capable widely available device. This is the
closest I've seen..
Jason
Powered by blists - more mailing lists