* What is the meaning of PASID_MIN?
@ 2019-02-11 19:28 Matthew Wilcox
[not found] ` <20190211192804.GI12668-PfSpb0PWhxZc2C7mugBRk2EX/6BAtgUQ@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Matthew Wilcox @ 2019-02-11 19:28 UTC (permalink / raw)
To: Ashok Raj, Lu Baolu, Kevin Tian, Liu Yi L, Peter Xu, Joerg Roedel
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
I'm looking at commit 562831747f6299abd481b5b00bd4fa19d5c8a259
which fails to adequately explain why we can't use PASID 0. Commit
af39507305fb83a5d3c475c2851f4d59545d8a18 also doesn't explain why PASID
0 is no longer usable for the intel-svm driver.
There are a load of simplifications that could be made to this, but I
don't know which ones to suggest without a clear understanding of the
problem you're actually trying to solve.
^ permalink raw reply [flat|nested] 4+ messages in thread[parent not found: <20190211192804.GI12668-PfSpb0PWhxZc2C7mugBRk2EX/6BAtgUQ@public.gmane.org>]
* Re: What is the meaning of PASID_MIN? [not found] ` <20190211192804.GI12668-PfSpb0PWhxZc2C7mugBRk2EX/6BAtgUQ@public.gmane.org> @ 2019-02-12 2:44 ` Lu Baolu [not found] ` <0d86f3e8-60ec-5433-8602-487c8dc1ed83-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Lu Baolu @ 2019-02-12 2:44 UTC (permalink / raw) To: Matthew Wilcox, Ashok Raj, Kevin Tian, Liu Yi L, Peter Xu, Joerg Roedel Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA Hi, On 2/12/19 3:28 AM, Matthew Wilcox wrote: > > I'm looking at commit 562831747f6299abd481b5b00bd4fa19d5c8a259 > which fails to adequately explain why we can't use PASID 0. Commit > af39507305fb83a5d3c475c2851f4d59545d8a18 also doesn't explain why PASID > 0 is no longer usable for the intel-svm driver. Sorry that we didn't make it clear. > > There are a load of simplifications that could be made to this, but I > don't know which ones to suggest without a clear understanding of the > problem you're actually trying to solve. > PASID 0 has been reserved by Intel IOMMU driver for RID_PASID purpose. VT-d scalable mode treats all address translation as PASID granularity. For DMA requests-with-PASID, the PASID value in the DMA request will be used. For DMA requests-without-PASID, VT-d will use a static PASID value specified in the RID_PASID field of the context entry. PASID 0 has been reserved for this usage for all devices. (Please refer to 9.4 of the spec 3.0 for more details.) Best regards, Lu Baolu ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <0d86f3e8-60ec-5433-8602-487c8dc1ed83-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>]
* Re: What is the meaning of PASID_MIN? [not found] ` <0d86f3e8-60ec-5433-8602-487c8dc1ed83-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> @ 2019-02-12 3:02 ` Peter Xu 2019-02-12 3:13 ` Lu Baolu 0 siblings, 1 reply; 4+ messages in thread From: Peter Xu @ 2019-02-12 3:02 UTC (permalink / raw) To: Lu Baolu Cc: Kevin Tian, Joerg Roedel, Ashok Raj, Matthew Wilcox, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA On Tue, Feb 12, 2019 at 10:44:23AM +0800, Lu Baolu wrote: > Hi, > > On 2/12/19 3:28 AM, Matthew Wilcox wrote: > > > > I'm looking at commit 562831747f6299abd481b5b00bd4fa19d5c8a259 > > which fails to adequately explain why we can't use PASID 0. Commit > > af39507305fb83a5d3c475c2851f4d59545d8a18 also doesn't explain why PASID > > 0 is no longer usable for the intel-svm driver. > > Sorry that we didn't make it clear. > > > > > There are a load of simplifications that could be made to this, but I > > don't know which ones to suggest without a clear understanding of the > > problem you're actually trying to solve. > > > > PASID 0 has been reserved by Intel IOMMU driver for RID_PASID purpose. > > VT-d scalable mode treats all address translation as PASID granularity. > For DMA requests-with-PASID, the PASID value in the DMA request will be > used. For DMA requests-without-PASID, VT-d will use a static PASID value > specified in the RID_PASID field of the context entry. PASID 0 has been > reserved for this usage for all devices. > > (Please refer to 9.4 of the spec 3.0 for more details.) Hi, Baolu, I have a similar confusion. If PASID==0 is reserved for requests-without-PASID, then does it mean that for each scalable mode context entry the RID_PASID field will always be zero? Or say, since we already have the per-context-entry RID_PASID field which seems to be configurable, why we still need to reserve the PASID==0? Thanks, -- Peter Xu ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: What is the meaning of PASID_MIN? 2019-02-12 3:02 ` Peter Xu @ 2019-02-12 3:13 ` Lu Baolu 0 siblings, 0 replies; 4+ messages in thread From: Lu Baolu @ 2019-02-12 3:13 UTC (permalink / raw) To: Peter Xu Cc: Kevin Tian, Joerg Roedel, Ashok Raj, Matthew Wilcox, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA On 2/12/19 11:02 AM, Peter Xu wrote: > On Tue, Feb 12, 2019 at 10:44:23AM +0800, Lu Baolu wrote: >> Hi, >> >> On 2/12/19 3:28 AM, Matthew Wilcox wrote: >>> >>> I'm looking at commit 562831747f6299abd481b5b00bd4fa19d5c8a259 >>> which fails to adequately explain why we can't use PASID 0. Commit >>> af39507305fb83a5d3c475c2851f4d59545d8a18 also doesn't explain why PASID >>> 0 is no longer usable for the intel-svm driver. >> >> Sorry that we didn't make it clear. >> >>> >>> There are a load of simplifications that could be made to this, but I >>> don't know which ones to suggest without a clear understanding of the >>> problem you're actually trying to solve. >>> >> >> PASID 0 has been reserved by Intel IOMMU driver for RID_PASID purpose. >> >> VT-d scalable mode treats all address translation as PASID granularity. >> For DMA requests-with-PASID, the PASID value in the DMA request will be >> used. For DMA requests-without-PASID, VT-d will use a static PASID value >> specified in the RID_PASID field of the context entry. PASID 0 has been >> reserved for this usage for all devices. >> >> (Please refer to 9.4 of the spec 3.0 for more details.) > > Hi, Baolu, Hi Peter, > > I have a similar confusion. > > If PASID==0 is reserved for requests-without-PASID, then does it mean > that for each scalable mode context entry the RID_PASID field will > always be zero? Yes. > Or say, since we already have the per-context-entry > RID_PASID field which seems to be configurable, why we still need to > reserve the PASID==0? We decided to set RID_PASID always to 0. This will make things simple especially for virtual IOMMU case. It will also be compatible with other arch's which reserves PASID 0 for legacy translation. Best regards, Lu Baolu ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-02-12 3:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-11 19:28 What is the meaning of PASID_MIN? Matthew Wilcox
[not found] ` <20190211192804.GI12668-PfSpb0PWhxZc2C7mugBRk2EX/6BAtgUQ@public.gmane.org>
2019-02-12 2:44 ` Lu Baolu
[not found] ` <0d86f3e8-60ec-5433-8602-487c8dc1ed83-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2019-02-12 3:02 ` Peter Xu
2019-02-12 3:13 ` Lu Baolu
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox