Lines Matching refs:pgtable
204 static u64 *fetch_pte(struct amd_io_pgtable *pgtable, in fetch_pte() argument
211 pte = &pgtable->pgd[PM_LEVEL_INDEX(level, iova)]; in fetch_pte()
298 struct amd_io_pgtable *pgtable = io_pgtable_ops_to_data(ops); in iommu_v2_unmap_pages() local
299 struct io_pgtable_cfg *cfg = &pgtable->iop.cfg; in iommu_v2_unmap_pages()
309 pte = fetch_pte(pgtable, iova, &unmap_size); in iommu_v2_unmap_pages()
324 struct amd_io_pgtable *pgtable = io_pgtable_ops_to_data(ops); in iommu_v2_iova_to_phys() local
328 pte = fetch_pte(pgtable, iova, &pte_pgsize); in iommu_v2_iova_to_phys()
365 struct amd_io_pgtable *pgtable = container_of(iop, struct amd_io_pgtable, iop); in v2_free_pgtable() local
367 pdom = container_of(pgtable, struct protection_domain, iop); in v2_free_pgtable()
378 free_pgtable(pgtable->pgd, get_pgtable_level()); in v2_free_pgtable()
383 struct amd_io_pgtable *pgtable = io_pgtable_cfg_to_data(cfg); in v2_alloc_pgtable() local
387 pgtable->pgd = alloc_pgtable_page(); in v2_alloc_pgtable()
388 if (!pgtable->pgd) in v2_alloc_pgtable()
391 ret = amd_iommu_domain_set_gcr3(&pdom->domain, 0, iommu_virt_to_phys(pgtable->pgd)); in v2_alloc_pgtable()
395 pgtable->iop.ops.map_pages = iommu_v2_map_pages; in v2_alloc_pgtable()
396 pgtable->iop.ops.unmap_pages = iommu_v2_unmap_pages; in v2_alloc_pgtable()
397 pgtable->iop.ops.iova_to_phys = iommu_v2_iova_to_phys; in v2_alloc_pgtable()
404 return &pgtable->iop; in v2_alloc_pgtable()
407 free_pgtable_page(pgtable->pgd); in v2_alloc_pgtable()