diff options
author | Yu Zhao <yu.zhao@intel.com> | 2009-06-28 23:31:45 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2009-06-29 07:34:11 -0400 |
commit | bf92df30df909710c498d05620e2df1be1ef779b (patch) | |
tree | 9d1e330524fac88a95b6787e0b754e02e62df039 /drivers/pci/intel-iommu.c | |
parent | a679128d30d0303bbf5cac839c8f6f45793ea775 (diff) |
intel-iommu: Only avoid flushing device IOTLB for domain ID 0 in caching mode
In caching mode, domain ID 0 is reserved for non-present to present
mapping flush. Device IOTLB doesn't need to be flushed in this case.
Previously we were avoiding the flush for domain zero, even if the IOMMU
wasn't in caching mode and domain zero wasn't special.
Signed-off-by: Yu Zhao <yu.zhao@intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/pci/intel-iommu.c')
-rw-r--r-- | drivers/pci/intel-iommu.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index 420afa887283..3cad7006ed8e 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c | |||
@@ -1054,7 +1054,12 @@ static void iommu_flush_iotlb_psi(struct intel_iommu *iommu, u16 did, | |||
1054 | else | 1054 | else |
1055 | iommu->flush.flush_iotlb(iommu, did, addr, mask, | 1055 | iommu->flush.flush_iotlb(iommu, did, addr, mask, |
1056 | DMA_TLB_PSI_FLUSH); | 1056 | DMA_TLB_PSI_FLUSH); |
1057 | if (did) | 1057 | |
1058 | /* | ||
1059 | * In caching mode, domain ID 0 is reserved for non-present to present | ||
1060 | * mapping flush. Device IOTLB doesn't need to be flushed in this case. | ||
1061 | */ | ||
1062 | if (!cap_caching_mode(iommu->cap) || did) | ||
1058 | iommu_flush_dev_iotlb(iommu->domains[did], addr, mask); | 1063 | iommu_flush_dev_iotlb(iommu->domains[did], addr, mask); |
1059 | } | 1064 | } |
1060 | 1065 | ||