Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282779
b: refs/heads/master
c: 6d1c56a
h: refs/heads/master
i:
  282777: 7384d47
  282775: 5761788
v: v3
  • Loading branch information
Ohad Ben-Cohen authored and Joerg Roedel committed Nov 10, 2011
1 parent 9d309af commit 714b201
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aa3de9c05051ac26355276944789217040e38207
refs/heads/master: 6d1c56a9db48977942602a50e88eeb61a3e625eb
19 changes: 19 additions & 0 deletions trunk/drivers/iommu/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,24 @@
#define LEVEL_STRIDE (9)
#define LEVEL_MASK (((u64)1 << LEVEL_STRIDE) - 1)

/*
* This bitmap is used to advertise the page sizes our hardware support
* to the IOMMU core, which will then use this information to split
* physically contiguous memory regions it is mapping into page sizes
* that we support.
*
* Traditionally the IOMMU core just handed us the mappings directly,
* after making sure the size is an order of a 4KiB page and that the
* mapping has natural alignment.
*
* To retain this behavior, we currently advertise that we support
* all page sizes that are an order of 4KiB.
*
* If at some point we'd like to utilize the IOMMU core's new behavior,
* we could change this to advertise the real page sizes we support.
*/
#define INTEL_IOMMU_PGSIZES (~0xFFFUL)

static inline int agaw_to_level(int agaw)
{
return agaw + 2;
Expand Down Expand Up @@ -4066,6 +4084,7 @@ static struct iommu_ops intel_iommu_ops = {
.unmap = intel_iommu_unmap,
.iova_to_phys = intel_iommu_iova_to_phys,
.domain_has_cap = intel_iommu_domain_has_cap,
.pgsize_bitmap = INTEL_IOMMU_PGSIZES,
};

static void __devinit quirk_iommu_rwbf(struct pci_dev *dev)
Expand Down

0 comments on commit 714b201

Please sign in to comment.