Lines Matching refs:pa_iova_pfn
29 unsigned long *pa_iova_pfn; member
79 if (pa->pa_nr || pa->pa_iova_pfn) in pfn_array_alloc_pin()
88 pa->pa_iova_pfn = kcalloc(pa->pa_nr, in pfn_array_alloc_pin()
89 sizeof(*pa->pa_iova_pfn) + in pfn_array_alloc_pin()
92 if (unlikely(!pa->pa_iova_pfn)) { in pfn_array_alloc_pin()
96 pa->pa_pfn = pa->pa_iova_pfn + pa->pa_nr; in pfn_array_alloc_pin()
98 pa->pa_iova_pfn[0] = pa->pa_iova >> PAGE_SHIFT; in pfn_array_alloc_pin()
100 pa->pa_iova_pfn[i] = pa->pa_iova_pfn[i - 1] + 1; in pfn_array_alloc_pin()
102 ret = vfio_pin_pages(mdev, pa->pa_iova_pfn, pa->pa_nr, in pfn_array_alloc_pin()
108 vfio_unpin_pages(mdev, pa->pa_iova_pfn, ret); in pfn_array_alloc_pin()
117 kfree(pa->pa_iova_pfn); in pfn_array_alloc_pin()
118 pa->pa_iova_pfn = NULL; in pfn_array_alloc_pin()
126 vfio_unpin_pages(mdev, pa->pa_iova_pfn, pa->pa_nr); in pfn_array_unpin_free()
128 kfree(pa->pa_iova_pfn); in pfn_array_unpin_free()
168 if (pa->pa_iova_pfn[j] == iova_pfn) in pfn_array_table_iova_pinned()