Hi Suravee , On 2022/5/31 19:34, Suravee Suthikulpanit wrote:
On 4/29/22 4:09 AM, Joao Martins wrote:..... +static int amd_iommu_set_dirty_tracking(struct iommu_domain *domain, + bool enable) +{ + struct protection_domain *pdomain = to_pdomain(domain); + struct iommu_dev_data *dev_data; + bool dom_flush = false; + + if (!amd_iommu_had_support) + return -EOPNOTSUPP; + + list_for_each_entry(dev_data, &pdomain->dev_list, list) {Since we iterate through device list for the domain, we would need to call spin_lock_irqsave(&pdomain->lock, flags) here.
Not related, just out of curiosity. Does it really need to disable the interrupt while holding this lock? Any case this list would be traversed in any interrupt context? Perhaps I missed anything? Best regards, baolu _______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu
