intel-iommu: dump mappings but don't die on pte already set

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git-commits-head@...>
Date: Friday, July 3, 2009 - 5:59 pm

Gitweb:     http://git.kernel.org/linus/1bf20f0dc5629032ddd07617139d9fbca66c1642
Commit:     1bf20f0dc5629032ddd07617139d9fbca66c1642
Parent:     9051aa0268dc1c3e42cd79a802b0af1f2bfcadae
Author:     David Woodhouse <David.Woodhouse@intel.com>
AuthorDate: Mon Jun 29 22:06:43 2009 +0100
Committer:  David Woodhouse <David.Woodhouse@intel.com>
CommitDate: Tue Jun 30 03:55:21 2009 +0100

    intel-iommu: dump mappings but don't die on pte already set
    
    Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
---
 drivers/pci/intel-iommu.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index 1430853..40ce5a0 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -1673,7 +1673,16 @@ static int __domain_mapping(struct dmar_domain *domain, unsigned long iov_pfn,
 		/* We don't need lock here, nobody else
 		 * touches the iova range
 		 */
-		BUG_ON(dma_pte_addr(pte));
+		if (unlikely(dma_pte_addr(pte))) {
+			static int dumps = 5;
+			printk(KERN_CRIT "ERROR: DMA PTE for vPFN 0x%lx already set (to %llx)\n",
+			       iov_pfn, pte->val);
+			if (dumps) {
+				dumps--;
+				debug_dma_dump_mappings(NULL);
+			}
+			WARN_ON(1);
+		}
 		pte->val = pteval;
 		pte++;
 		if (!nr_pages ||
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
intel-iommu: dump mappings but don't die on pte already set, Linux Kernel Mailing List..., (Fri Jul 3, 5:59 pm)