Hi Jason,
On Wed, 12 Feb 2025 08:50:07 -0400
Jason Gunthorpe <[email protected]> wrote:
> On Tue, Feb 11, 2025 at 04:41:51PM -0800, Jacob Pan wrote:
>
> > I see the same on arm64 with v9.0, assigned an ixgbe nic via VFIO.
>
> Huh, I figured it worked on ARM..
>
> There is no requirement that an iommu driver implement identity, this
> is all an optimization. If it doesn't work in alot of cases can we
> just remove it? It would simplfy a lot..
>
Currently, identity domain type can be set via sysfs. To prevent that,
maybe we need this?
+static int viommu_def_domain_type(struct device *dev)
+{
+ return IOMMU_DOMAIN_DMA;
+}
+
static struct iommu_ops viommu_ops = {
.identity_domain = &viommu_identity_domain.domain,
.capable = viommu_capable,
@@ -1096,6 +1106,7 @@ static struct iommu_ops viommu_ops = {
.device_group = viommu_device_group,
.get_resv_regions = viommu_get_resv_regions,
.of_xlate = viommu_of_xlate,
+ .def_domain_type = viommu_def_domain_type,
.owner = THIS_MODULE,