All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lu Baolu <baolu.lu@linux.intel.com>
To: joro@8bytes.org, dwmw2@infradead.org
Cc: ashok.raj@intel.com, jacob.jun.pan@linux.intel.com,
	iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
	Lu Baolu <baolu.lu@linux.intel.com>
Subject: [PATCH 2/3] iommu/vt-d: Clear Page Request Overflow fault bit
Date: Thu, 19 Oct 2017 08:39:15 +0800	[thread overview]
Message-ID: <1508373556-5340-2-git-send-email-baolu.lu@linux.intel.com> (raw)
In-Reply-To: <1508373556-5340-1-git-send-email-baolu.lu@linux.intel.com>

Currently Page Request Overflow bit in IOMMU Fault Status register
is not cleared. Not clearing this bit would mean that any  future
page-request is going to be automatically dropped by IOMMU.

Suggested-by: Ashok Raj <ashok.raj@intel.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
---
 drivers/iommu/dmar.c        | 3 ++-
 include/linux/intel-iommu.h | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c
index 1ea7cd5..9a7ffd1 100644
--- a/drivers/iommu/dmar.c
+++ b/drivers/iommu/dmar.c
@@ -1679,7 +1679,8 @@ irqreturn_t dmar_fault(int irq, void *dev_id)
 		raw_spin_lock_irqsave(&iommu->register_lock, flag);
 	}
 
-	writel(DMA_FSTS_PFO | DMA_FSTS_PPF, iommu->reg + DMAR_FSTS_REG);
+	writel(DMA_FSTS_PFO | DMA_FSTS_PPF | DMA_FSTS_PRO,
+	       iommu->reg + DMAR_FSTS_REG);
 
 unlock_exit:
 	raw_spin_unlock_irqrestore(&iommu->register_lock, flag);
diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h
index 485a5b4..f3274d9 100644
--- a/include/linux/intel-iommu.h
+++ b/include/linux/intel-iommu.h
@@ -212,6 +212,7 @@
 #define DMA_FSTS_IQE (1 << 4)
 #define DMA_FSTS_ICE (1 << 5)
 #define DMA_FSTS_ITE (1 << 6)
+#define DMA_FSTS_PRO (1 << 7)
 #define dma_fsts_fault_record_index(s) (((s) >> 8) & 0xff)
 
 /* FRCD_REG, 32 bits access */
-- 
2.7.4

  reply	other threads:[~2017-10-19  0:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-19  0:39 [PATCH 1/3] iommu/vt-d: Missing checks for pasid tables if allocation fails Lu Baolu
2017-10-19  0:39 ` Lu Baolu
2017-10-19  0:39 ` Lu Baolu [this message]
2017-10-19  0:39 ` [PATCH 3/3] iommu/vt-d: Clear pasid table entry when memory unbound Lu Baolu
2017-10-19  6:40 ` [PATCH 1/3] iommu/vt-d: Missing checks for pasid tables if allocation fails Liu, Yi L
     [not found]   ` <A2975661238FB949B60364EF0F2C257439AFB902-0J0gbvR4kTg/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2017-10-20  0:48     ` Lu Baolu
2017-10-20  0:48       ` Lu Baolu
     [not found]       ` <59E947F7.4030402-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-10-20  6:32         ` Liu, Yi L
2017-10-20  6:32           ` Liu, Yi L
     [not found] ` <1508373556-5340-1-git-send-email-baolu.lu-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-11-06 20:13   ` Alex Williamson
2017-11-06 20:13     ` Alex Williamson
     [not found]     ` <20171106131309.6bc1084a-1yVPhWWZRC1BDLzU/O5InQ@public.gmane.org>
2017-11-07  2:57       ` Lu Baolu
2017-11-07  2:57         ` Lu Baolu

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=1508373556-5340-2-git-send-email-baolu.lu@linux.intel.com \
    --to=baolu.lu@linux.intel.com \
    --cc=ashok.raj@intel.com \
    --cc=dwmw2@infradead.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jacob.jun.pan@linux.intel.com \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.