Lines Matching refs:pgtable
290 static u64 *fetch_pte(struct amd_io_pgtable *pgtable, in fetch_pte() argument
299 if (address > PM_LEVEL_SIZE(pgtable->mode)) in fetch_pte()
302 level = pgtable->mode - 1; in fetch_pte()
303 pte = &pgtable->root[PM_LEVEL_INDEX(level, address)]; in fetch_pte()
443 struct amd_io_pgtable *pgtable = io_pgtable_ops_to_data(ops); in iommu_v1_unmap_pages() local
454 pte = fetch_pte(pgtable, iova, &unmap_size); in iommu_v1_unmap_pages()
474 struct amd_io_pgtable *pgtable = io_pgtable_ops_to_data(ops); in iommu_v1_iova_to_phys() local
478 pte = fetch_pte(pgtable, iova, &pte_pgsize); in iommu_v1_iova_to_phys()
494 struct amd_io_pgtable *pgtable = container_of(iop, struct amd_io_pgtable, iop); in v1_free_pgtable() local
498 if (pgtable->mode == PAGE_MODE_NONE) in v1_free_pgtable()
501 dom = container_of(pgtable, struct protection_domain, iop); in v1_free_pgtable()
504 BUG_ON(pgtable->mode < PAGE_MODE_NONE || in v1_free_pgtable()
505 pgtable->mode > PAGE_MODE_6_LEVEL); in v1_free_pgtable()
507 free_sub_pt(pgtable->root, pgtable->mode, &freelist); in v1_free_pgtable()
520 struct amd_io_pgtable *pgtable = io_pgtable_cfg_to_data(cfg); in v1_alloc_pgtable() local
527 pgtable->iop.ops.map_pages = iommu_v1_map_pages; in v1_alloc_pgtable()
528 pgtable->iop.ops.unmap_pages = iommu_v1_unmap_pages; in v1_alloc_pgtable()
529 pgtable->iop.ops.iova_to_phys = iommu_v1_iova_to_phys; in v1_alloc_pgtable()
531 return &pgtable->iop; in v1_alloc_pgtable()