Re: [PATCH 1/2] powerpc: iommu: Bring back table group release_ownership() call

From: Timothy Pearson
Date: Fri Jan 26 2024 - 10:37:01 EST




----- Original Message -----
> From: "Jason Gunthorpe" <jgg@xxxxxxxx>
> To: "Shivaprasad G Bhat" <sbhat@xxxxxxxxxxxxx>
> Cc: iommu@xxxxxxxxxxxxxxx, "linuxppc-dev" <linuxppc-dev@xxxxxxxxxxxxxxxx>, "linux-kernel"
> <linux-kernel@xxxxxxxxxxxxxxx>, "Michael Ellerman" <mpe@xxxxxxxxxxxxxx>, "npiggin" <npiggin@xxxxxxxxx>, "christophe
> leroy" <christophe.leroy@xxxxxxxxxx>, "aneesh kumar" <aneesh.kumar@xxxxxxxxxx>, "naveen n rao"
> <naveen.n.rao@xxxxxxxxxxxxx>, jroedel@xxxxxxx, "Timothy Pearson" <tpearson@xxxxxxxxxxxxxxxxxxxxx>, aik@xxxxxxx,
> bgray@xxxxxxxxxxxxx, "Greg Kroah-Hartman" <gregkh@xxxxxxxxxxxxxxxxxxx>, gbatra@xxxxxxxxxxxxxxxxxx,
> vaibhav@xxxxxxxxxxxxx
> Sent: Friday, January 26, 2024 9:17:01 AM
> Subject: Re: [PATCH 1/2] powerpc: iommu: Bring back table group release_ownership() call

> On Fri, Jan 26, 2024 at 08:43:12PM +0530, Shivaprasad G Bhat wrote:
>> > Also, is there any chance someone can work on actually fixing this to
>> > be a proper iommu driver? I think that will become important for power
>> > to use the common dma_iommu code in the next year...
>> We are looking into it.
>
> Okay, let me know, I can possibly help make parts of this happen
>
> power is the last still-current architecture to be outside the modern
> IOMMU and DMA API design and I'm going to start proposing things that
> will not be efficient on power because of this.

I can get development resources on this fairly rapidly, including testing. We should figure out the best way forward and how to deal with the VFIO side of things, even if that's a rewrite at the end of the day the machine-specific codebase isn't *that* large for our two target flavors (64-bit PowerNV and 64-bit pSeries).

> I think a basic iommu driver using the dma API would not be so hard.
>
> I don't know what to do about the SPAPR VFIO mess though. :(
>
> Jason