[RFT][PATCH v1 6/6] vfio: Replace phys_pfn with phys_page for vfio_pin_pages()
Nicolin Chen
nicolinc at nvidia.com
Sun Jun 19 06:41:30 UTC 2022
On Sat, Jun 18, 2022 at 11:18:17PM -0700, Christoph Hellwig wrote:
> > > There is a bunch of code an comments in the iommu type1 code that
> > > suggest we can pin memory that is not page backed.
> >
> > Would you mind explaining the use case for pinning memory that
> > isn't page backed? And do we have such use case so far?
>
> Sorry, I should have deleted that sentence. I wrote it before spending
> some more time to dig through the code and all the locked memory has
> page backing. There just seem to be a lot of checks left inbetween
> if a pfn is page backed, mostly due to the pfn based calling convetions.
OK. We'd be safe to move on then. Thanks for the clarification.
> > I can do that. I tried once, but there were just too much changes
> > inside type1 code that felt like a chain reaction. If we plan to
> > eventually replace with IOMMUFD implementations, these changes in
> > type1 might not be necessary, I thought.
>
> To make sure we keep full compatibility I suspect the final iommufd
> implementation has to be gradutally created from the existing code
> anyway.
Hmm. I think Jason can give some insight. Meanwhile, I will try
to add a patch to type1 code, in case we'd end up with what you
suspected.
More information about the dri-devel
mailing list