On Tue, Apr 22, 2025 at 03:54:22PM +0800, Lu Baolu wrote:
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c index cb0b993bebb4..63c9c97ccf69 100644 --- a/drivers/iommu/intel/iommu.c +++ b/drivers/iommu/intel/iommu.c @@ -4385,6 +4385,7 @@ static struct iommu_domain identity_domain = { .attach_dev = identity_domain_attach_dev, .set_dev_pasid = identity_domain_set_dev_pasid, },
- .owner = &intel_iommu_ops,
};
Is this a systemic mistake in all the static domains in all the drivers?
Maybe a bigger check is a more complete fix:
static bool iommu_domain_compatible(struct device *dev, struct iommu_domain *domain) { const struct iommu_ops *ops = dev_iommu_ops(dev);
if (domain->owner == ops) return true;
/* For static domains owner isn't set */ if (ops->blocked_domain == domain || ops->identity_domain == domain) return true; return false; }
Jason