> 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) 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? Except that nit: Reviewed-by: Kevin Tian <kevin.t...@intel.com>