diff options
author | Nicolin Chen <[email protected]> | 2022-07-22 19:02:56 -0700 |
---|---|---|
committer | Alex Williamson <[email protected]> | 2022-07-25 13:41:22 -0600 |
commit | 34a255e67615995f729254307a0581c143e03752 (patch) | |
tree | 9f094c6346aa4e0b77f2b02fb33ae8d530047b04 /lib/mpi/mpi-sub-ui.c | |
parent | c2863febd88bb2d0028eebcf0ee94b49859a06d3 (diff) |
vfio: Replace phys_pfn with pages for vfio_pin_pages()
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.
And drop the pfn_valid check in the gvt code, as there is no need to
do such a check at a page-backed struct page pointer.
For now, also update vfio_iommu_type1 to fit this new parameter too.
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Kirti Wankhede <[email protected]>
Reviewed-by: Jason Gunthorpe <[email protected]>
Reviewed-by: Kevin Tian <[email protected]>
Acked-by: Eric Farman <[email protected]>
Tested-by: Terrence Xu <[email protected]>
Tested-by: Eric Farman <[email protected]>
Signed-off-by: Nicolin Chen <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alex Williamson <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-sub-ui.c')
0 files changed, 0 insertions, 0 deletions