Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 264416
b: refs/heads/master
c: 8140a95
h: refs/heads/master
v: v3
  • Loading branch information
Allen Kay authored and David Woodhouse committed Oct 19, 2011
1 parent c538b90 commit 9aeaeaa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 292827cb164ad00cc7689a21283b1261c0b6daed
refs/heads/master: 8140a95d228efbcd64d84150e794761a32463947
12 changes: 7 additions & 5 deletions trunk/drivers/iommu/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -580,17 +580,18 @@ static void domain_update_iommu_snooping(struct dmar_domain *domain)

static void domain_update_iommu_superpage(struct dmar_domain *domain)
{
int i, mask = 0xf;
struct dmar_drhd_unit *drhd;
struct intel_iommu *iommu = NULL;
int mask = 0xf;

if (!intel_iommu_superpage) {
domain->iommu_superpage = 0;
return;
}

domain->iommu_superpage = 4; /* 1TiB */

for_each_set_bit(i, &domain->iommu_bmp, g_num_of_iommus) {
mask |= cap_super_page_val(g_iommus[i]->cap);
/* set iommu_superpage to the smallest common denominator */
for_each_active_iommu(iommu, drhd) {
mask &= cap_super_page_val(iommu->cap);
if (!mask) {
break;
}
Expand Down Expand Up @@ -3748,6 +3749,7 @@ static int intel_iommu_domain_init(struct iommu_domain *domain)
vm_domain_exit(dmar_domain);
return -ENOMEM;
}
domain_update_iommu_cap(dmar_domain);
domain->priv = dmar_domain;

return 0;
Expand Down

0 comments on commit 9aeaeaa

Please sign in to comment.