Re: [PATCH v2 10/10] iommu: Split struct iommu_ops

From: Jason Gunthorpe
Date: Wed Feb 09 2022 - 08:43:16 EST


On Tue, Feb 08, 2022 at 10:46:14PM -0800, Christoph Hellwig wrote:
> On Tue, Feb 08, 2022 at 09:25:59AM +0800, Lu Baolu wrote:
> > Move the domain specific operations out of struct iommu_ops into a new
> > structure that only has domain specific operations. This solves the
> > problem of needing to know if the method vector for a given operation
> > needs to be retrieved from the device or the domain. Logically the domain
> > ops are the ones that make sense for external subsystems and endpoint
> > drivers to use, while device ops, with the sole exception of domain_alloc,
> > are IOMMU API internals.
>
> I can't say I like the default_domain_ops concept all that much, but
> the split itself looks like a good idea and done nicely.

I agree, but don't think it is worth aruging about. The split is nice
so:

Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>

Jason