Re: [PATCH v4 5/6] iova: Add iova_len argument to init_iova_domain()

From: John Garry
Date: Tue Sep 21 2021 - 04:45:36 EST


On 02/08/2021 17:16, Robin Murphy wrote:

Also fix up all users to set this value (at 0, meaning use default).
Wrap that in init_iova_domain_defaults() to avoid the mysterious 0?

Sure, I can do something like that. I actually did have separate along those lines in v3 before I decided to change it.

Y'know, at this point I'm now starting to seriously wonder whether moving the rcaches into iommu_dma_cookie wouldn't make a whole lot of things simpler... :/

Does that sound like crazy talk to you, or an idea worth entertaining?

Hi Robin,

JFYI, to try to make inroads into my IOVA issues, I'm going to look to do this first, if you don't mind. I think that the fq stuff can also be put into a separate structure also, rather than iova_domain, and that can also be a member of iommu_dma_cookie.

BTW, with regards to separating the rcache magazine code out, I see someone already trying to introduce something similar:

https://lore.kernel.org/lkml/CAKW4uUxperg41z8Lu5QYsS-YEGt1anuD1CuiUqXC0ANFqJBosQ@xxxxxxxxxxxxxx/T/#me4cc5de775ad16ab3d6e7ca854b55f274ddcba08

https://lore.kernel.org/lkml/YUkErK1vVZMht4s8@xxxxxxxxxxxxxxxxxxxx/T/#t

Cheers,
John