mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Baolu Lu <baolu.lu@linux.intel.com>
To: Joel Granados <j.granados@samsung.com>, Jason Gunthorpe <jgg@ziepe.ca>
Cc: baolu.lu@linux.intel.com, Klaus Jensen <its@irrelevant.dk>,
	David Woodhouse <dwmw2@infradead.org>,
	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,
	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, 2 Sep 2024 20:47:21 +0800	[thread overview]
Message-ID: <d1e1370a-0714-4da8-b645-f56d83ab0159@linux.intel.com> (raw)
In-Reply-To: <20240902104819.a2jto6l3tv2h5wvq@joelS2.panther.com>

On 2024/9/2 18:48, Joel Granados wrote:
>> I definitely expect PRI to work outside PASID and SVA cases, so this
>> is going in a good direction
> This touches on a detail (at least in Intel's vtd-io spec) that is not
> 100% clear to me. Second paragraph of section "3.4.3 Scalable Mode
> Address Translation" reads:
> "
>    ... Scalable-mode context-entries support both requests-without-PASID
>    and requests-with-PASID. However unlike legacy mode, in scalable-mode,
>    requests-without-PASID obtain a PASID value from the RID_PASID field of
>    the scalable-mode context- entry and are processed similarly to
>    requests-with-PASID.Implementations not supporting RID_PASID capability
>    (ECAP_REG.RPS is 0b), use a PASID value of 0 to perform address
>    translation for requests without PASID.
> "
> This basically means that a default PASID is used even though the
> request is without PASID. Right? Therefore "outside PASID" means with
> the default PASID (at least in Intels case). Right?

Kind of yes.

The PCI specification defines the concept of PASID and its role in
transaction routing. We refer to PCI transactions with a PASID prefix as
"request-with-PASID" and those without a PASID prefix as "request-
without-PASID." Consequently, I understand 'outside PASID' to mean
transactions that do not have a PASID prefix.

The VT-d specification describes how the IOMMU hardware handles request-
without-PASID. It uses a reserved PASID for its internal routing and
handling purposes. If RID_PASID is supported (ECAP_REG.RPS=1), software
can select its own reserved PASID. Otherwise, the IOMMU hardware will
use a default value of 0.

Thanks,
baolu

  parent reply	other threads:[~2024-09-02 12:47 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-26 11:40 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 ` [PATCH RFC PREVIEW 0/6] iommu: enable user space iopfs in non-nested and non-svm cases Jason Gunthorpe
2024-09-02 10:48   ` Joel Granados
2024-09-02 11:06     ` Joel Granados
2024-09-02 12:47     ` Baolu Lu [this message]
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=d1e1370a-0714-4da8-b645-f56d83ab0159@linux.intel.com \
    --to=baolu.lu@linux.intel.com \
    --cc=dwmw2@infradead.org \
    --cc=iommu@lists.linux.dev \
    --cc=its@irrelevant.dk \
    --cc=j.granados@samsung.com \
    --cc=jgg@ziepe.ca \
    --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

all inboxes | Powered by JetHome®