diff options
author | Jiang Liu <jiang.liu@linux.intel.com> | 2014-07-11 02:19:25 -0400 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2014-07-23 10:04:46 -0400 |
commit | c3b497c6bb51a2be1173cbf1d1ef4ce5e88e722e (patch) | |
tree | 9afe825991c03752289a442f0dcd5abfe8002243 /drivers/iommu | |
parent | cbb24a25a871cbdac4e58b68b541aadd91b249be (diff) |
iommu/vt-d: Match segment number when searching for dev_iotlb capable devices
For virtual machine and static identity domains, there may be devices
from different PCI segments associated with the same domain.
So function iommu_support_dev_iotlb() should also match PCI segment
number (iommu unit) when searching for dev_iotlb capable devices.
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/intel-iommu.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 3664d0d00338..147ab1c0b573 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c | |||
@@ -1272,7 +1272,8 @@ iommu_support_dev_iotlb (struct dmar_domain *domain, struct intel_iommu *iommu, | |||
1272 | 1272 | ||
1273 | spin_lock_irqsave(&device_domain_lock, flags); | 1273 | spin_lock_irqsave(&device_domain_lock, flags); |
1274 | list_for_each_entry(info, &domain->devices, link) | 1274 | list_for_each_entry(info, &domain->devices, link) |
1275 | if (info->bus == bus && info->devfn == devfn) { | 1275 | if (info->iommu == iommu && info->bus == bus && |
1276 | info->devfn == devfn) { | ||
1276 | found = 1; | 1277 | found = 1; |
1277 | break; | 1278 | break; |
1278 | } | 1279 | } |