summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/intel-iommu.c
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2014-03-19 11:38:49 +0100
committerDavid Woodhouse <David.Woodhouse@intel.com>2014-03-19 18:22:13 +0100
commit214e39aa36c9c02355d388f20d83b93fc2fa7298 (patch)
tree9300218db801c8aa7a12314b89348fe376934d8f /drivers/iommu/intel-iommu.c
parentiommu/vt-d: Clean up and fix page table clear/free behaviour (diff)
downloadlinux-214e39aa36c9c02355d388f20d83b93fc2fa7298.tar.xz
linux-214e39aa36c9c02355d388f20d83b93fc2fa7298.zip
iommu/vt-d: Honour intel_iommu=sp_off for non-VMM domains
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/iommu/intel-iommu.c')
-rw-r--r--drivers/iommu/intel-iommu.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index f5934fc2bbcc..c3d4bc91a189 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -1624,7 +1624,11 @@ static int domain_init(struct dmar_domain *domain, int guest_width)
else
domain->iommu_snooping = 0;
- domain->iommu_superpage = fls(cap_super_page_val(iommu->cap));
+ if (intel_iommu_superpage)
+ domain->iommu_superpage = fls(cap_super_page_val(iommu->cap));
+ else
+ domain->iommu_superpage = 0;
+
domain->nid = iommu->node;
/* always allocate the top pgd */