Re: [PATCH v4 3/5] iommu/virtio: Move to domain_alloc_paging()

2025-04-10 Thread Jason Gunthorpe
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); > > +

RE: [PATCH v4 3/5] iommu/virtio: Move to domain_alloc_paging()

2025-04-10 Thread Tian, Kevin
> 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

[PATCH v4 3/5] iommu/virtio: Move to domain_alloc_paging()

2025-04-08 Thread Jason Gunthorpe
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