On Thu, Aug 13, 2026 at 03:29:13PM -0700, Jacob Pan wrote:
> > +static int hv_iommu_blocking_attach_dev(struct iommu_domain *domain,
> > + struct device *dev,
> > + struct iommu_domain *old)
> > +{
> > + struct hv_iommu_endpoint *vdev = dev_iommu_priv_get(dev);
> > + struct hv_iommu_domain *hv_domain =
> > to_hv_iommu_domain(domain);
> > + struct pci_dev *pdev = to_pci_dev(dev);
> > + int ret;
> > +
> > + if (pdev->ats_enabled)
> > + pci_disable_ats(pdev);
> > +
> > + if (vdev->hv_domain == hv_domain)
> > + return 0;
> It may not be needed since the core code will check this. If you keep
> this as extra precaution, should this be moved up before ats? since ats
> must be disabled already if blocking domain is attached.
Why check it at all? Is there an issue with attaching the same thing
twice? Will it blip the DMA or something?
Jason