public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Klaus Jensen <its@irrelevant.dk>
Cc: David Woodhouse <dwmw2@infradead.org>,
	Lu Baolu <baolu.lu@linux.intel.com>,
	Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Kevin Tian <kevin.tian@intel.com>,
	Minwoo Im <minwoo.im@samsung.com>,
	linux-kernel@vger.kernel.org, iommu@lists.linux.dev,
	Joel Granados <j.granados@samsung.com>,
	Klaus Jensen <k.jensen@samsung.com>
Subject: Re: [PATCH RFC PREVIEW 0/6] iommu: enable user space iopfs in non-nested and non-svm cases
Date: Mon, 26 Aug 2024 10:59:55 -0300	[thread overview]
Message-ID: <20240826135955.GI3468552@ziepe.ca> (raw)
In-Reply-To: <20240826-iopf-for-all-v1-0-59174e6a7528@samsung.com>

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

  parent reply	other threads:[~2024-08-26 13:59 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-26 11:40 [PATCH RFC PREVIEW 0/6] iommu: enable user space iopfs in non-nested and non-svm cases Klaus Jensen
2024-08-26 11:40 ` [PATCH RFC PREVIEW 1/6] iommu/vt-d: Separate page request queue from SVM Klaus Jensen
2024-08-26 13:09   ` Baolu Lu
2024-09-04  9:12     ` Joel Granados
2024-09-04 11:07       ` Baolu Lu
2024-09-01  5:16   ` Baolu Lu
2024-09-04  8:39     ` Joel Granados
2024-08-26 11:40 ` [PATCH RFC PREVIEW 2/6] iommu: Make IOMMU_IOPF selectable in Kconfig Klaus Jensen
2024-08-26 14:05   ` Jason Gunthorpe
2024-09-04  9:44     ` Joel Granados
2024-08-26 11:40 ` [PATCH RFC PREVIEW 3/6] iommufd: Enable PRI when doing the iommufd_hwpt_alloc Klaus Jensen
2024-08-26 11:40 ` [PATCH RFC PREVIEW 4/6] iommu: init pasid array while doing domain_replace and iopf is active Klaus Jensen
2024-08-26 11:40 ` [PATCH RFC PREVIEW 5/6] iommu/vt-d: drop pasid requirement for prq initialization Klaus Jensen
2024-08-26 11:40 ` [PATCH RFC PREVIEW 6/6] iommu/vt-d: do not require a PASID in page requests Klaus Jensen
2024-09-04 10:19   ` Joel Granados
2024-09-04 11:39     ` Joel Granados
2024-08-26 13:59 ` Jason Gunthorpe [this message]
2024-09-02 10:48   ` [PATCH RFC PREVIEW 0/6] iommu: enable user space iopfs in non-nested and non-svm cases Joel Granados
2024-09-02 11:06     ` Joel Granados
2024-09-02 12:47     ` Baolu Lu
2024-09-03 13:20       ` Joel Granados
2024-09-04  1:37         ` Baolu Lu
2024-09-04 10:05           ` Joel Granados
2024-09-04 16:13     ` Jason Gunthorpe
2024-09-09 14:46       ` Joel Granados

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=20240826135955.GI3468552@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=baolu.lu@linux.intel.com \
    --cc=dwmw2@infradead.org \
    --cc=iommu@lists.linux.dev \
    --cc=its@irrelevant.dk \
    --cc=j.granados@samsung.com \
    --cc=joro@8bytes.org \
    --cc=k.jensen@samsung.com \
    --cc=kevin.tian@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minwoo.im@samsung.com \
    --cc=robin.murphy@arm.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