Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1550803 > unrolled thread

[PATCH v5 05/17] iommu: Only map direct mapped regions

Started byEric Auger <eric.auger@redhat.com>
First post2017-01-04 14:50 +0100
Last post2017-01-04 14:50 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v5 05/17] iommu: Only map direct mapped regions Eric Auger <eric.auger@redhat.com> - 2017-01-04 14:50 +0100

#1550803 — [PATCH v5 05/17] iommu: Only map direct mapped regions

FromEric Auger <eric.auger@redhat.com>
Date2017-01-04 14:50 +0100
Subject[PATCH v5 05/17] iommu: Only map direct mapped regions
Message-ID<sVU6Z-5lr-15@gated-at.bofh.it>
As we introduced new reserved region types which do not require
mapping, let's make sure we only map direct mapped regions.

Signed-off-by: Eric Auger <eric.auger@redhat.com>

---

v3 -> v4:
- use region's type and reword commit message and title
---
 drivers/iommu/iommu.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 927878d..41c1906 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -343,6 +343,9 @@ static int iommu_group_create_direct_mappings(struct iommu_group *group,
 		start = ALIGN(entry->start, pg_size);
 		end   = ALIGN(entry->start + entry->length, pg_size);
 
+		if (entry->type != IOMMU_RESV_DIRECT)
+			continue;
+
 		for (addr = start; addr < end; addr += pg_size) {
 			phys_addr_t phys_addr;
 
-- 
1.9.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web