Skip to content

Commit

Permalink
iommu/vt-d: Match segment number when searching for dev_iotlb capable…
Browse files Browse the repository at this point in the history
… 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>
  • Loading branch information
Jiang Liu authored and Joerg Roedel committed Jul 23, 2014
1 parent cbb24a2 commit c3b497c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/iommu/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,8 @@ iommu_support_dev_iotlb (struct dmar_domain *domain, struct intel_iommu *iommu,

spin_lock_irqsave(&device_domain_lock, flags);
list_for_each_entry(info, &domain->devices, link)
if (info->bus == bus && info->devfn == devfn) {
if (info->iommu == iommu && info->bus == bus &&
info->devfn == devfn) {
found = 1;
break;
}
Expand Down

0 comments on commit c3b497c

Please sign in to comment.