All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fenghua Yu <fenghua.yu@intel.com>
To: David Woodhouse <dwmw2@infradead.org>, Tony Luck <tony.luck@intel.com>
Cc: iommu@lists.linux-foundation.org, linux-ia64@vger.kernel.org,
	linux-kernel@vger.kernel.org, Fenghua Yu <fenghua.yu@intel.com>
Subject: [PATCH 4/4] Bug Fix drivers/pci/intel-iommu.c: convert pfn_lo to VTD page address when calling iommu
Date: Tue, 04 Aug 2009 22:11:20 +0000	[thread overview]
Message-ID: <20090804221119.GA21544@linux-os.sc.intel.com> (raw)
In-Reply-To: <200908042017.n74KHsNw018095@bz-web1.app.phx.redhat.com>

The iova->pfn_lo should be converted to VTD page address before it's passed to
iommu_flush_dev_iotlb().

This issue may cause DMA failure on PAGE_SIZE>VTD_PAGE_SIZE platforms e.g. ia64
platforms.

Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>

---

 drivers/pci/intel-iommu.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index bec29ed..54ee63d 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -2647,7 +2654,7 @@ static void flush_unmaps(void)
 			mask = (iova->pfn_hi - iova->pfn_lo + 1) << PAGE_SHIFT;
 			mask = ilog2(mask >> VTD_PAGE_SHIFT);
 			iommu_flush_dev_iotlb(deferred_flush[i].domain[j],
-					iova->pfn_lo << PAGE_SHIFT, mask);
+					iova->pfn_lo << VTD_PAGE_SHIFT, mask);
 			__free_iova(&deferred_flush[i].domain[j]->iovad, iova);
 		}
 		deferred_flush[i].next = 0;

WARNING: multiple messages have this Message-ID (diff)
From: Fenghua Yu <fenghua.yu@intel.com>
To: David Woodhouse <dwmw2@infradead.org>, Tony Luck <tony.luck@intel.com>
Cc: iommu@lists.linux-foundation.org, linux-ia64@vger.kernel.org,
	linux-kernel@vger.kernel.org, Fenghua Yu <fenghua.yu@intel.com>
Subject: [PATCH 4/4] Bug Fix drivers/pci/intel-iommu.c: convert pfn_lo to VTD page address when calling iommu_flush_dev_iotlb()
Date: Tue, 4 Aug 2009 15:11:20 -0700	[thread overview]
Message-ID: <20090804221119.GA21544@linux-os.sc.intel.com> (raw)
In-Reply-To: <200908042017.n74KHsNw018095@bz-web1.app.phx.redhat.com>

The iova->pfn_lo should be converted to VTD page address before it's passed to
iommu_flush_dev_iotlb().

This issue may cause DMA failure on PAGE_SIZE>VTD_PAGE_SIZE platforms e.g. ia64
platforms.

Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>

---

 drivers/pci/intel-iommu.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index bec29ed..54ee63d 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -2647,7 +2654,7 @@ static void flush_unmaps(void)
 			mask = (iova->pfn_hi - iova->pfn_lo + 1) << PAGE_SHIFT;
 			mask = ilog2(mask >> VTD_PAGE_SHIFT);
 			iommu_flush_dev_iotlb(deferred_flush[i].domain[j],
-					iova->pfn_lo << PAGE_SHIFT, mask);
+					iova->pfn_lo << VTD_PAGE_SHIFT, mask);
 			__free_iova(&deferred_flush[i].domain[j]->iovad, iova);
 		}
 		deferred_flush[i].next = 0;

  parent reply	other threads:[~2009-08-04 22:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-504363-150293@bugzilla.redhat.com>
     [not found] ` <200908042017.n74KHsNw018095@bz-web1.app.phx.redhat.com>
2009-08-04 22:10   ` [PATCH 3/4] Bug Fix drivers/pci/intel-iommu.c: convert paddr to correct DMA pfn Fenghua Yu
2009-08-04 22:10     ` Fenghua Yu
2009-08-05  7:23     ` [PATCH 3/4] Bug Fix drivers/pci/intel-iommu.c: convert paddr David Woodhouse
2009-08-05  7:23       ` [PATCH 3/4] Bug Fix drivers/pci/intel-iommu.c: convert paddr to correct DMA pfn David Woodhouse
2009-08-04 22:11   ` Fenghua Yu [this message]
2009-08-04 22:11     ` [PATCH 4/4] Bug Fix drivers/pci/intel-iommu.c: convert pfn_lo to VTD page address when calling iommu_flush_dev_iotlb() Fenghua Yu
2009-08-05  8:19     ` [PATCH 4/4] Bug Fix drivers/pci/intel-iommu.c: convert pfn_lo David Woodhouse
2009-08-05  8:19       ` [PATCH 4/4] Bug Fix drivers/pci/intel-iommu.c: convert pfn_lo to VTD page address when calling iommu_flush_dev_iotlb() David Woodhouse
2009-08-31 19:28     ` [PATCH] linux-next drm_cache.c: fix compilation error Fenghua Yu
2009-08-31 19:28       ` Fenghua Yu

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=20090804221119.GA21544@linux-os.sc.intel.com \
    --to=fenghua.yu@intel.com \
    --cc=dwmw2@infradead.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony.luck@intel.com \
    /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.