Re: [PATCH 1/1] vfio/spapr_tce: convert get_user_pages() --> pin_user_pages()

2020-05-26 Thread John Hubbard
On 2020-05-26 12:28, Souptick Joarder wrote: @@ -486,7 +486,7 @@ static int tce_iommu_use_page(unsigned long tce, unsigned long *hpa) struct page *page = NULL; enum dma_data_direction direction = iommu_tce_direction(tce); - if (get_user_pages_fast(tce & PAGE_MASK, 1, +

Re: [PATCH 1/1] vfio/spapr_tce: convert get_user_pages() --> pin_user_pages()

2020-05-26 Thread Souptick Joarder
Hi John, On Sat, May 23, 2020 at 7:13 AM John Hubbard wrote: > > This code was using get_user_pages*(), in a "Case 2" scenario > (DMA/RDMA), using the categorization from [1]. That means that it's > time to convert the get_user_pages*() + put_page() calls to > pin_user_pages*() + unpin_user_pages

[PATCH 1/1] vfio/spapr_tce: convert get_user_pages() --> pin_user_pages()

2020-05-22 Thread John Hubbard
This code was using get_user_pages*(), in a "Case 2" scenario (DMA/RDMA), using the categorization from [1]. That means that it's time to convert the get_user_pages*() + put_page() calls to pin_user_pages*() + unpin_user_pages() calls. There is some helpful background in [2]: basically, this is a