On Mon, 2009-05-18 at 13:51 +0800, Yu Zhao wrote: > > +static struct device_domain_info *iommu_support_dev_iotlb( > + struct dmar_domain *domain, int segment, u8 bus, u8 devfn) > +{ > + int found = 0; > + unsigned long flags; > + struct device_domain_info *info; > + struct intel_iommu *iommu = device_to_iommu(segment, bus, > devfn); > + > + if (!ecap_dev_iotlb_support(iommu->ecap)) > + return NULL; > + > + if (!iommu->qi) > + return NULL; > + > + spin_lock_irqsave(&device_domain_lock, flags); > + list_for_each_entry(info, &domain->devices, link) > + if (info->bus == bus && info->devfn == devfn) { > + found = 1; > + break; > + } > + spin_unlock_irqrestore(&device_domain_lock, flags); What if there's more than one device? You only enable ATS for the first device that supports it, and ignore the others? -- David Woodhouse Open Source Technology Centre David.Woodhouse@xxxxxxxxx Intel Corporation -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html