On Thu, Apr 10, 2025 at 05:55:50AM +, Tian, Kevin wrote:
> > From: Jason Gunthorpe
> > Sent: Wednesday, April 9, 2025 12:36 AM
> >
> > +static struct iommu_domain *viommu_domain_alloc_identity(struct device
> > *dev)
> > +{
> > + struct viommu_endpoint *vdev = dev_iommu_priv_get(dev);
> > +
> From: Jason Gunthorpe
> Sent: Wednesday, April 9, 2025 12:36 AM
>
> +static struct iommu_domain *viommu_domain_alloc_identity(struct device
> *dev)
> +{
> + struct viommu_endpoint *vdev = dev_iommu_priv_get(dev);
> + struct iommu_domain *domain;
> + int ret;
> +
> + if (virtio_h
virtio has the complication that it sometimes wants to return a paging
domain for IDENTITY which makes this conversion a little different than
other drivers.
Add a viommu_domain_alloc_paging() that combines viommu_domain_alloc() and
viommu_domain_finalise() to always return a fully initialized and