Lines Matching refs:iova
48 u64 *iova) in iommufd_test_syz_conv_iova() argument
54 struct syz_layout *syz = (void *)iova; in iommufd_test_syz_conv_iova()
73 unsigned int ioas_id, u64 *iova, u32 *flags) in iommufd_test_syz_conv_iova_id() argument
84 *iova = iommufd_test_syz_conv_iova(&ioas->iopt, iova); in iommufd_test_syz_conv_iova_id()
179 unsigned long iova, phys_addr_t paddr, in mock_domain_map_pages() argument
186 unsigned long start_iova = iova; in mock_domain_map_pages()
195 WARN_ON(iova % MOCK_IO_PAGE_SIZE); in mock_domain_map_pages()
205 old = xa_store(&mock->pfns, iova / MOCK_IO_PAGE_SIZE, in mock_domain_map_pages()
210 for (; start_iova != iova; in mock_domain_map_pages()
218 iova += MOCK_IO_PAGE_SIZE; in mock_domain_map_pages()
228 unsigned long iova, size_t pgsize, in mock_domain_unmap_pages() argument
238 WARN_ON(iova % MOCK_IO_PAGE_SIZE); in mock_domain_unmap_pages()
245 ent = xa_erase(&mock->pfns, iova / MOCK_IO_PAGE_SIZE); in mock_domain_unmap_pages()
264 iova += MOCK_IO_PAGE_SIZE; in mock_domain_unmap_pages()
272 dma_addr_t iova) in mock_domain_iova_to_phys() argument
278 WARN_ON(iova % MOCK_IO_PAGE_SIZE); in mock_domain_iova_to_phys()
279 ent = xa_load(&mock->pfns, iova / MOCK_IO_PAGE_SIZE); in mock_domain_iova_to_phys()
515 unsigned int mockpt_id, unsigned long iova, in iommufd_test_md_check_pa() argument
523 if (iova % MOCK_IO_PAGE_SIZE || length % MOCK_IO_PAGE_SIZE || in iommufd_test_md_check_pa()
551 ent = xa_load(&mock->pfns, iova / MOCK_IO_PAGE_SIZE); in iommufd_test_md_check_pa()
558 iova += MOCK_IO_PAGE_SIZE; in iommufd_test_md_check_pa()
614 unsigned long iova; member
636 static void iommufd_test_access_unmap(void *data, unsigned long iova, in iommufd_test_access_unmap() argument
639 unsigned long iova_last = iova + length - 1; in iommufd_test_access_unmap()
646 if (iova > item->iova + item->length - 1 || in iommufd_test_access_unmap()
647 iova_last < item->iova) in iommufd_test_access_unmap()
650 iommufd_access_unpin_pages(staccess->access, item->iova, in iommufd_test_access_unmap()
672 iommufd_access_unpin_pages(staccess->access, item->iova, in iommufd_test_access_item_destroy()
827 unsigned int access_id, unsigned long iova, in iommufd_test_access_pages() argument
855 iova = iommufd_test_syz_conv_iova(&staccess->access->ioas->iopt, in iommufd_test_access_pages()
856 &cmd->access_pages.iova); in iommufd_test_access_pages()
858 npages = (ALIGN(iova + length, PAGE_SIZE) - in iommufd_test_access_pages()
859 ALIGN_DOWN(iova, PAGE_SIZE)) / in iommufd_test_access_pages()
877 rc = iommufd_access_pin_pages(staccess->access, iova, length, pages, in iommufd_test_access_pages()
885 uptr - (iova - ALIGN_DOWN(iova, PAGE_SIZE)), pages, in iommufd_test_access_pages()
897 item->iova = iova; in iommufd_test_access_pages()
912 iommufd_access_unpin_pages(staccess->access, iova, length); in iommufd_test_access_pages()
922 unsigned int access_id, unsigned long iova, in iommufd_test_access_rw() argument
957 iova = iommufd_test_syz_conv_iova(&staccess->access->ioas->iopt, in iommufd_test_access_rw()
958 &cmd->access_rw.iova); in iommufd_test_access_rw()
960 rc = iommufd_access_rw(staccess->access, iova, tmp, length, flags); in iommufd_test_access_rw()
1009 ucmd, cmd->id, cmd->check_map.iova, in iommufd_test()
1024 ucmd, cmd->id, cmd->access_pages.iova, in iommufd_test()
1030 ucmd, cmd->id, cmd->access_rw.iova, in iommufd_test()