lkml.org 
[lkml]   [2022]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFT][PATCH v2 9/9] vfio: Replace phys_pfn with pages for vfio_pin_pages()
On Thu, Jul 07, 2022 at 08:49:28AM +0000, Tian, Kevin wrote:
> External email: Use caution opening links or attachments
>
>
> > From: Nicolin Chen <nicolinc@nvidia.com>
> > Sent: Wednesday, July 6, 2022 2:28 PM
> >
> > Most of the callers of vfio_pin_pages() want "struct page *" and the
> > low-level mm code to pin pages returns a list of "struct page *" too.
> > So there's no gain in converting "struct page *" to PFN in between.
> >
> > Replace the output parameter "phys_pfn" list with a "pages" list, to
> > simplify callers. This also allows us to replace the vfio_iommu_type1
> > implementation with a more efficient one.
>
> worth mentioning that vfio pin is only for struct page * hence the
> pfn_valid() check in gvt can be removed.

Will add that.

> >
> > For now, also update vfio_iommu_type1 to fit this new parameter too.
> >
> > Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
>
> Reviewed-by: Kevin Tian <kevin.tian@intel.com>

Thanks for the review!

\
 
 \ /
  Last update: 2022-07-07 19:05    [W:0.151 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site