diff options
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/intel-iommu.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index be999ff025af..3778ab149baf 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c | |||
@@ -3158,6 +3158,17 @@ static phys_addr_t intel_iommu_iova_to_phys(struct iommu_domain *domain, | |||
3158 | return phys; | 3158 | return phys; |
3159 | } | 3159 | } |
3160 | 3160 | ||
3161 | static int intel_iommu_domain_has_cap(struct iommu_domain *domain, | ||
3162 | unsigned long cap) | ||
3163 | { | ||
3164 | struct dmar_domain *dmar_domain = domain->priv; | ||
3165 | |||
3166 | if (cap == IOMMU_CAP_CACHE_COHERENCY) | ||
3167 | return dmar_domain->iommu_snooping; | ||
3168 | |||
3169 | return 0; | ||
3170 | } | ||
3171 | |||
3161 | static struct iommu_ops intel_iommu_ops = { | 3172 | static struct iommu_ops intel_iommu_ops = { |
3162 | .domain_init = intel_iommu_domain_init, | 3173 | .domain_init = intel_iommu_domain_init, |
3163 | .domain_destroy = intel_iommu_domain_destroy, | 3174 | .domain_destroy = intel_iommu_domain_destroy, |
@@ -3166,6 +3177,7 @@ static struct iommu_ops intel_iommu_ops = { | |||
3166 | .map = intel_iommu_map_range, | 3177 | .map = intel_iommu_map_range, |
3167 | .unmap = intel_iommu_unmap_range, | 3178 | .unmap = intel_iommu_unmap_range, |
3168 | .iova_to_phys = intel_iommu_iova_to_phys, | 3179 | .iova_to_phys = intel_iommu_iova_to_phys, |
3180 | .domain_has_cap = intel_iommu_domain_has_cap, | ||
3169 | }; | 3181 | }; |
3170 | 3182 | ||
3171 | static void __devinit quirk_iommu_rwbf(struct pci_dev *dev) | 3183 | static void __devinit quirk_iommu_rwbf(struct pci_dev *dev) |