iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] iommu/vt-d: Several misc fixes
@ 2021-02-25  6:26 Lu Baolu
  2021-02-25  6:26 ` [PATCH 1/5] iommu/vt-d: Report the right page fault address Lu Baolu
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Lu Baolu @ 2021-02-25  6:26 UTC (permalink / raw)
  To: Joerg Roedel, Will Deacon
  Cc: kevin.tian, ashok.raj, sanjay.k.kumar, linux-kernel, iommu,
	jacob.jun.pan

Hi Joerg,

This series includes some misc fixes for the VT-d iommu driver. Please
help to review and merge.

Best regards,
baolu

Lu Baolu (5):
  iommu/vt-d: Report the right page fault address
  iommu/vt-d: Remove WO permissions on second-level paging entries
  iommu/vt-d: Invalidate PASID cache when root/context entry changed
  iommu/vt-d: Use user privilege for RID2PASID translation
  iommu/vt-d: Avoid unnecessary cache flush in pasid entry teardown

 drivers/iommu/intel/iommu.c | 28 ++++++++++++++++------------
 drivers/iommu/intel/pasid.c |  6 +++++-
 drivers/iommu/intel/svm.c   |  2 +-
 include/linux/intel-iommu.h |  1 +
 4 files changed, 23 insertions(+), 14 deletions(-)

-- 
2.25.1

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/5] iommu/vt-d: Report the right page fault address
  2021-02-25  6:26 [PATCH 0/5] iommu/vt-d: Several misc fixes Lu Baolu
@ 2021-02-25  6:26 ` Lu Baolu
  2021-02-25  6:26 ` [PATCH 2/5] iommu/vt-d: Remove WO permissions on second-level paging entries Lu Baolu
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Lu Baolu @ 2021-02-25  6:26 UTC (permalink / raw)
  To: Joerg Roedel, Will Deacon
  Cc: kevin.tian, ashok.raj, sanjay.k.kumar, linux-kernel, iommu,
	jacob.jun.pan

The Address field of the Page Request Descriptor only keeps bit [63:12]
of the offending address. Convert it to a full address before reporting
it to device drivers.

Fixes: eb8d93ea3c1d3 ("iommu/vt-d: Report page request faults for guest SVA")
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
---
 drivers/iommu/intel/svm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/intel/svm.c b/drivers/iommu/intel/svm.c
index 574a7e657a9a..d76cc79f3496 100644
--- a/drivers/iommu/intel/svm.c
+++ b/drivers/iommu/intel/svm.c
@@ -862,7 +862,7 @@ intel_svm_prq_report(struct device *dev, struct page_req_dsc *desc)
 	/* Fill in event data for device specific processing */
 	memset(&event, 0, sizeof(struct iommu_fault_event));
 	event.fault.type = IOMMU_FAULT_PAGE_REQ;
-	event.fault.prm.addr = desc->addr;
+	event.fault.prm.addr = (u64)desc->addr << VTD_PAGE_SHIFT;
 	event.fault.prm.pasid = desc->pasid;
 	event.fault.prm.grpid = desc->prg_index;
 	event.fault.prm.perm = prq_to_iommu_prot(desc);
-- 
2.25.1

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/5] iommu/vt-d: Remove WO permissions on second-level paging entries
  2021-02-25  6:26 [PATCH 0/5] iommu/vt-d: Several misc fixes Lu Baolu
  2021-02-25  6:26 ` [PATCH 1/5] iommu/vt-d: Report the right page fault address Lu Baolu
@ 2021-02-25  6:26 ` Lu Baolu
  2021-03-04 12:26   ` Joerg Roedel
  2021-02-25  6:26 ` [PATCH 3/5] iommu/vt-d: Invalidate PASID cache when root/context entry changed Lu Baolu
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Lu Baolu @ 2021-02-25  6:26 UTC (permalink / raw)
  To: Joerg Roedel, Will Deacon
  Cc: kevin.tian, ashok.raj, sanjay.k.kumar, linux-kernel, iommu,
	jacob.jun.pan

When the first level page table is used for IOVA translation, it only
supports Read-Only and Read-Write permissions. The Write-Only permission
is not supported as the PRESENT bit (implying Read permission) should
always set. When using second level, we still give separate permissions
that allows WriteOnly which seems inconsistent and awkward. There is no
use case we can think off, hence remove that configuration to make it
consistent.

Suggested-by: Ashok Raj <ashok.raj@intel.com>
Fixes: b802d070a52a1 ("iommu/vt-d: Use iova over first level")
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
---
 drivers/iommu/intel/iommu.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index ee0932307d64..19b3fd0d035b 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -2305,8 +2305,9 @@ __domain_mapping(struct dmar_domain *domain, unsigned long iov_pfn,
 		return -EINVAL;
 
 	attr = prot & (DMA_PTE_READ | DMA_PTE_WRITE | DMA_PTE_SNP);
+	attr |= DMA_FL_PTE_PRESENT;
 	if (domain_use_first_level(domain)) {
-		attr |= DMA_FL_PTE_PRESENT | DMA_FL_PTE_XD | DMA_FL_PTE_US;
+		attr |= DMA_FL_PTE_XD | DMA_FL_PTE_US;
 
 		if (domain->domain.type == IOMMU_DOMAIN_DMA) {
 			attr |= DMA_FL_PTE_ACCESS;
-- 
2.25.1

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/5] iommu/vt-d: Invalidate PASID cache when root/context entry changed
  2021-02-25  6:26 [PATCH 0/5] iommu/vt-d: Several misc fixes Lu Baolu
  2021-02-25  6:26 ` [PATCH 1/5] iommu/vt-d: Report the right page fault address Lu Baolu
  2021-02-25  6:26 ` [PATCH 2/5] iommu/vt-d: Remove WO permissions on second-level paging entries Lu Baolu
@ 2021-02-25  6:26 ` Lu Baolu
  2021-02-25  6:26 ` [PATCH 4/5] iommu/vt-d: Use user privilege for RID2PASID translation Lu Baolu
  2021-02-25  6:26 ` [PATCH 5/5] iommu/vt-d: Avoid unnecessary cache flush in pasid entry teardown Lu Baolu
  4 siblings, 0 replies; 11+ messages in thread
From: Lu Baolu @ 2021-02-25  6:26 UTC (permalink / raw)
  To: Joerg Roedel, Will Deacon
  Cc: kevin.tian, ashok.raj, sanjay.k.kumar, linux-kernel, iommu,
	jacob.jun.pan

When the Intel IOMMU is operating in the scalable mode, some information
from the root and context table may be used to tag entries in the PASID
cache. Software should invalidate the PASID-cache when changing root or
context table entries.

Suggested-by: Ashok Raj <ashok.raj@intel.com>
Fixes: 7373a8cc38197 ("iommu/vt-d: Setup context and enable RID2PASID support")
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
---
 drivers/iommu/intel/iommu.c | 18 +++++++++---------
 include/linux/intel-iommu.h |  1 +
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index 19b3fd0d035b..f41b184ce6eb 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -1340,6 +1340,11 @@ static void iommu_set_root_entry(struct intel_iommu *iommu)
 		      readl, (sts & DMA_GSTS_RTPS), sts);
 
 	raw_spin_unlock_irqrestore(&iommu->register_lock, flag);
+
+	iommu->flush.flush_context(iommu, 0, 0, 0, DMA_CCMD_GLOBAL_INVL);
+	if (sm_supported(iommu))
+		qi_flush_pasid_cache(iommu, 0, QI_PC_GLOBAL, 0);
+	iommu->flush.flush_iotlb(iommu, 0, 0, 0, DMA_TLB_GLOBAL_FLUSH);
 }
 
 void iommu_flush_write_buffer(struct intel_iommu *iommu)
@@ -2423,6 +2428,10 @@ static void domain_context_clear_one(struct intel_iommu *iommu, u8 bus, u8 devfn
 				   (((u16)bus) << 8) | devfn,
 				   DMA_CCMD_MASK_NOBIT,
 				   DMA_CCMD_DEVICE_INVL);
+
+	if (sm_supported(iommu))
+		qi_flush_pasid_cache(iommu, did_old, QI_PC_ALL_PASIDS, 0);
+
 	iommu->flush.flush_iotlb(iommu,
 				 did_old,
 				 0,
@@ -3268,8 +3277,6 @@ static int __init init_dmars(void)
 		register_pasid_allocator(iommu);
 #endif
 		iommu_set_root_entry(iommu);
-		iommu->flush.flush_context(iommu, 0, 0, 0, DMA_CCMD_GLOBAL_INVL);
-		iommu->flush.flush_iotlb(iommu, 0, 0, 0, DMA_TLB_GLOBAL_FLUSH);
 	}
 
 #ifdef CONFIG_INTEL_IOMMU_BROKEN_GFX_WA
@@ -3459,12 +3466,7 @@ static int init_iommu_hw(void)
 		}
 
 		iommu_flush_write_buffer(iommu);
-
 		iommu_set_root_entry(iommu);
-
-		iommu->flush.flush_context(iommu, 0, 0, 0,
-					   DMA_CCMD_GLOBAL_INVL);
-		iommu->flush.flush_iotlb(iommu, 0, 0, 0, DMA_TLB_GLOBAL_FLUSH);
 		iommu_enable_translation(iommu);
 		iommu_disable_protect_mem_regions(iommu);
 	}
@@ -3847,8 +3849,6 @@ static int intel_iommu_add(struct dmar_drhd_unit *dmaru)
 		goto disable_iommu;
 
 	iommu_set_root_entry(iommu);
-	iommu->flush.flush_context(iommu, 0, 0, 0, DMA_CCMD_GLOBAL_INVL);
-	iommu->flush.flush_iotlb(iommu, 0, 0, 0, DMA_TLB_GLOBAL_FLUSH);
 	iommu_enable_translation(iommu);
 
 	iommu_disable_protect_mem_regions(iommu);
diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h
index 1bc46b88711a..d1f32b33415a 100644
--- a/include/linux/intel-iommu.h
+++ b/include/linux/intel-iommu.h
@@ -372,6 +372,7 @@ enum {
 /* PASID cache invalidation granu */
 #define QI_PC_ALL_PASIDS	0
 #define QI_PC_PASID_SEL		1
+#define QI_PC_GLOBAL		3
 
 #define QI_EIOTLB_ADDR(addr)	((u64)(addr) & VTD_PAGE_MASK)
 #define QI_EIOTLB_IH(ih)	(((u64)ih) << 6)
-- 
2.25.1

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 4/5] iommu/vt-d: Use user privilege for RID2PASID translation
  2021-02-25  6:26 [PATCH 0/5] iommu/vt-d: Several misc fixes Lu Baolu
                   ` (2 preceding siblings ...)
  2021-02-25  6:26 ` [PATCH 3/5] iommu/vt-d: Invalidate PASID cache when root/context entry changed Lu Baolu
@ 2021-02-25  6:26 ` Lu Baolu
  2021-02-25  6:26 ` [PATCH 5/5] iommu/vt-d: Avoid unnecessary cache flush in pasid entry teardown Lu Baolu
  4 siblings, 0 replies; 11+ messages in thread
From: Lu Baolu @ 2021-02-25  6:26 UTC (permalink / raw)
  To: Joerg Roedel, Will Deacon
  Cc: kevin.tian, ashok.raj, sanjay.k.kumar, linux-kernel, iommu,
	jacob.jun.pan

When first-level page tables are used for IOVA translation, we use user
privilege by setting U/S bit in the page table entry. This is to make it
consistent with the second level translation, where the U/S enforcement
is not available. Clear the SRE (Supervisor Request Enable) field in the
pasid table entry of RID2PASID so that requests requesting the supervisor
privilege are blocked and treated as DMA remapping faults.

Suggested-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Fixes: b802d070a52a1 ("iommu/vt-d: Use iova over first level")
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
---
 drivers/iommu/intel/iommu.c | 7 +++++--
 drivers/iommu/intel/pasid.c | 3 ++-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index f41b184ce6eb..b14427d8121f 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -2495,9 +2495,9 @@ static int domain_setup_first_level(struct intel_iommu *iommu,
 				    struct device *dev,
 				    u32 pasid)
 {
-	int flags = PASID_FLAG_SUPERVISOR_MODE;
 	struct dma_pte *pgd = domain->pgd;
 	int agaw, level;
+	int flags = 0;
 
 	/*
 	 * Skip top levels of page tables for iommu which has
@@ -2513,7 +2513,10 @@ static int domain_setup_first_level(struct intel_iommu *iommu,
 	if (level != 4 && level != 5)
 		return -EINVAL;
 
-	flags |= (level == 5) ? PASID_FLAG_FL5LP : 0;
+	if (pasid != PASID_RID2PASID)
+		flags |= PASID_FLAG_SUPERVISOR_MODE;
+	if (level == 5)
+		flags |= PASID_FLAG_FL5LP;
 
 	return intel_pasid_setup_first_level(iommu, dev, (pgd_t *)pgd, pasid,
 					     domain->iommu_did[iommu->seq_id],
diff --git a/drivers/iommu/intel/pasid.c b/drivers/iommu/intel/pasid.c
index f26cb6195b2c..07531e5edfa2 100644
--- a/drivers/iommu/intel/pasid.c
+++ b/drivers/iommu/intel/pasid.c
@@ -647,7 +647,8 @@ int intel_pasid_setup_second_level(struct intel_iommu *iommu,
 	 * Since it is a second level only translation setup, we should
 	 * set SRE bit as well (addresses are expected to be GPAs).
 	 */
-	pasid_set_sre(pte);
+	if (pasid != PASID_RID2PASID)
+		pasid_set_sre(pte);
 	pasid_set_present(pte);
 	pasid_flush_caches(iommu, pte, pasid, did);
 
-- 
2.25.1

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 5/5] iommu/vt-d: Avoid unnecessary cache flush in pasid entry teardown
  2021-02-25  6:26 [PATCH 0/5] iommu/vt-d: Several misc fixes Lu Baolu
                   ` (3 preceding siblings ...)
  2021-02-25  6:26 ` [PATCH 4/5] iommu/vt-d: Use user privilege for RID2PASID translation Lu Baolu
@ 2021-02-25  6:26 ` Lu Baolu
  4 siblings, 0 replies; 11+ messages in thread
From: Lu Baolu @ 2021-02-25  6:26 UTC (permalink / raw)
  To: Joerg Roedel, Will Deacon
  Cc: kevin.tian, ashok.raj, sanjay.k.kumar, linux-kernel, iommu,
	jacob.jun.pan

When a present pasid entry is disassembled, all kinds of pasid related
caches need to be flushed. But when a pasid entry is not being used
(PRESENT bit not set), we don't need to do this. Check the PRESENT bit
in intel_pasid_tear_down_entry() and avoid flushing caches if it's not
set.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
---
 drivers/iommu/intel/pasid.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/iommu/intel/pasid.c b/drivers/iommu/intel/pasid.c
index 07531e5edfa2..9fb3d3e80408 100644
--- a/drivers/iommu/intel/pasid.c
+++ b/drivers/iommu/intel/pasid.c
@@ -493,6 +493,9 @@ void intel_pasid_tear_down_entry(struct intel_iommu *iommu, struct device *dev,
 	if (WARN_ON(!pte))
 		return;
 
+	if (!(pte->val[0] & PASID_PTE_PRESENT))
+		return;
+
 	did = pasid_get_domain_id(pte);
 	intel_pasid_clear_entry(dev, pasid, fault_ignore);
 
-- 
2.25.1

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/5] iommu/vt-d: Remove WO permissions on second-level paging entries
  2021-02-25  6:26 ` [PATCH 2/5] iommu/vt-d: Remove WO permissions on second-level paging entries Lu Baolu
@ 2021-03-04 12:26   ` Joerg Roedel
  2021-03-08  1:58     ` Lu Baolu
  0 siblings, 1 reply; 11+ messages in thread
From: Joerg Roedel @ 2021-03-04 12:26 UTC (permalink / raw)
  To: Lu Baolu
  Cc: kevin.tian, ashok.raj, sanjay.k.kumar, linux-kernel, iommu,
	jacob.jun.pan, Will Deacon

On Thu, Feb 25, 2021 at 02:26:51PM +0800, Lu Baolu wrote:
> When the first level page table is used for IOVA translation, it only
> supports Read-Only and Read-Write permissions. The Write-Only permission
> is not supported as the PRESENT bit (implying Read permission) should
> always set. When using second level, we still give separate permissions
> that allows WriteOnly which seems inconsistent and awkward. There is no
> use case we can think off, hence remove that configuration to make it
> consistent.

No use-case for WriteOnly mappings? How about DMA_FROM_DEVICE mappings?

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/5] iommu/vt-d: Remove WO permissions on second-level paging entries
  2021-03-04 12:26   ` Joerg Roedel
@ 2021-03-08  1:58     ` Lu Baolu
  2021-03-08 19:47       ` Raj, Ashok
  0 siblings, 1 reply; 11+ messages in thread
From: Lu Baolu @ 2021-03-08  1:58 UTC (permalink / raw)
  To: Joerg Roedel
  Cc: kevin.tian, ashok.raj, sanjay.k.kumar, linux-kernel, iommu,
	jacob.jun.pan, Will Deacon

Hi Joerg,

On 3/4/21 8:26 PM, Joerg Roedel wrote:
> On Thu, Feb 25, 2021 at 02:26:51PM +0800, Lu Baolu wrote:
>> When the first level page table is used for IOVA translation, it only
>> supports Read-Only and Read-Write permissions. The Write-Only permission
>> is not supported as the PRESENT bit (implying Read permission) should
>> always set. When using second level, we still give separate permissions
>> that allows WriteOnly which seems inconsistent and awkward. There is no
>> use case we can think off, hence remove that configuration to make it
>> consistent.
> 
> No use-case for WriteOnly mappings? How about DMA_FROM_DEVICE mappings?
> 

The statement of no use case is not correct. Sorry about it.

As we have moved to use first level for IOVA translation, the first
level page table entry only provides RO and RW permissions. So if any
device driver specifies DMA_FROM_DEVICE attribution, it will get RW
permission in the page table. This patch aims to make the permissions
of second level and first level consistent. No impact on the use of
DMA_FROM_DEVICE attribution.

Best regards,
baolu
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/5] iommu/vt-d: Remove WO permissions on second-level paging entries
  2021-03-08  1:58     ` Lu Baolu
@ 2021-03-08 19:47       ` Raj, Ashok
  2021-03-18  9:12         ` Joerg Roedel
  0 siblings, 1 reply; 11+ messages in thread
From: Raj, Ashok @ 2021-03-08 19:47 UTC (permalink / raw)
  To: Lu Baolu
  Cc: kevin.tian, Ashok Raj, sanjay.k.kumar, linux-kernel, iommu,
	jacob.jun.pan, Will Deacon

Hi Joerg

On Mon, Mar 08, 2021 at 09:58:26AM +0800, Lu Baolu wrote:
> Hi Joerg,
> 
> On 3/4/21 8:26 PM, Joerg Roedel wrote:
> >On Thu, Feb 25, 2021 at 02:26:51PM +0800, Lu Baolu wrote:
> >>When the first level page table is used for IOVA translation, it only
> >>supports Read-Only and Read-Write permissions. The Write-Only permission
> >>is not supported as the PRESENT bit (implying Read permission) should
> >>always set. When using second level, we still give separate permissions
> >>that allows WriteOnly which seems inconsistent and awkward. There is no
> >>use case we can think off, hence remove that configuration to make it
> >>consistent.
> >
> >No use-case for WriteOnly mappings? How about DMA_FROM_DEVICE mappings?
> >
> 
> The statement of no use case is not correct. Sorry about it.
> 
> As we have moved to use first level for IOVA translation, the first
> level page table entry only provides RO and RW permissions. So if any
> device driver specifies DMA_FROM_DEVICE attribution, it will get RW
> permission in the page table. This patch aims to make the permissions
> of second level and first level consistent. No impact on the use of
> DMA_FROM_DEVICE attribution.
> 

That is the primary motivation, given that we have moved to 1st level for
general IOVA, first level doesn't have a WO mapping. I didn't know enough
about the history to determine if a WO without a READ is very useful. I
guess the ZLR was invented to support those cases without a READ in PCIe. I

Early Intel IOMMU's didn't handle ZLR properly, until we fixed it in the
next generation. It just seemed opposite to the CPU page-tables, and we
wanted to have consistent behavior. After moving to 1st level, we don't
want things to work sometimes, and break if we use 2nd level for the same
mappings.

Hope this helps

Cheers,
Ashok
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/5] iommu/vt-d: Remove WO permissions on second-level paging entries
  2021-03-08 19:47       ` Raj, Ashok
@ 2021-03-18  9:12         ` Joerg Roedel
  2021-03-19  0:24           ` Lu Baolu
  0 siblings, 1 reply; 11+ messages in thread
From: Joerg Roedel @ 2021-03-18  9:12 UTC (permalink / raw)
  To: Raj, Ashok
  Cc: kevin.tian, sanjay.k.kumar, linux-kernel, iommu, jacob.jun.pan,
	Will Deacon

Hi,

On Mon, Mar 08, 2021 at 11:47:46AM -0800, Raj, Ashok wrote:
> That is the primary motivation, given that we have moved to 1st level for
> general IOVA, first level doesn't have a WO mapping. I didn't know enough
> about the history to determine if a WO without a READ is very useful. I
> guess the ZLR was invented to support those cases without a READ in PCIe. I

Okay, please update the commit message and re-send. I guess these
patches are 5.13 stuff. In that case, Baolu can include them into his
pull request later this cycle.

Regards,

	Joerg
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/5] iommu/vt-d: Remove WO permissions on second-level paging entries
  2021-03-18  9:12         ` Joerg Roedel
@ 2021-03-19  0:24           ` Lu Baolu
  0 siblings, 0 replies; 11+ messages in thread
From: Lu Baolu @ 2021-03-19  0:24 UTC (permalink / raw)
  To: Joerg Roedel, Raj, Ashok
  Cc: kevin.tian, sanjay.k.kumar, linux-kernel, iommu, jacob.jun.pan,
	Will Deacon

Hi Joerg,

On 3/18/21 5:12 PM, Joerg Roedel wrote:
> Hi,
> 
> On Mon, Mar 08, 2021 at 11:47:46AM -0800, Raj, Ashok wrote:
>> That is the primary motivation, given that we have moved to 1st level for
>> general IOVA, first level doesn't have a WO mapping. I didn't know enough
>> about the history to determine if a WO without a READ is very useful. I
>> guess the ZLR was invented to support those cases without a READ in PCIe. I
> 
> Okay, please update the commit message and re-send. I guess these
> patches are 5.13 stuff. In that case, Baolu can include them into his
> pull request later this cycle.

Okay! It works for me.

Best regards,
baolu
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-03-19  0:33 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-25  6:26 [PATCH 0/5] iommu/vt-d: Several misc fixes Lu Baolu
2021-02-25  6:26 ` [PATCH 1/5] iommu/vt-d: Report the right page fault address Lu Baolu
2021-02-25  6:26 ` [PATCH 2/5] iommu/vt-d: Remove WO permissions on second-level paging entries Lu Baolu
2021-03-04 12:26   ` Joerg Roedel
2021-03-08  1:58     ` Lu Baolu
2021-03-08 19:47       ` Raj, Ashok
2021-03-18  9:12         ` Joerg Roedel
2021-03-19  0:24           ` Lu Baolu
2021-02-25  6:26 ` [PATCH 3/5] iommu/vt-d: Invalidate PASID cache when root/context entry changed Lu Baolu
2021-02-25  6:26 ` [PATCH 4/5] iommu/vt-d: Use user privilege for RID2PASID translation Lu Baolu
2021-02-25  6:26 ` [PATCH 5/5] iommu/vt-d: Avoid unnecessary cache flush in pasid entry teardown Lu Baolu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).