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

Christoph Hellwig
2022-02-09T06:46:29Z

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.