On Thu, Apr 10, 2025 at 05:55:50AM +0000, Tian, Kevin wrote:
> > From: Jason Gunthorpe <j...@nvidia.com>
> > 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_has_feature(vdev->viommu->vdev,
> > +                          VIRTIO_IOMMU_F_BYPASS_CONFIG))
> > +           return &viommu_identity_domain.domain;
> > +
> 
> Does it make more sense to keep the @identity_domain field (same
> as all other drivers) 

I think having two ways to get an identity domain is more confusion as
one will never be used..

> and rename this new ops to @domain_alloc_sw_identity() so it's clear
> that the new op is only used when identity is emulated using paging?

I think no, we had some use cases to return real identity domains too,
like DART can use this op to runtime detect if the iommu supports
identity.

s390 had something similar

Thanks,
Jason

Reply via email to