• Home
  • Raw
  • Download

Lines Matching refs:pte

1198 	u64 *pte;  in increase_address_space()  local
1204 pte = (void *)get_zeroed_page(gfp); in increase_address_space()
1205 if (!pte) in increase_address_space()
1208 *pte = PM_LEVEL_PDE(domain->mode, in increase_address_space()
1210 domain->pt_root = pte; in increase_address_space()
1224 u64 *pte, *page; in alloc_pte() local
1232 pte = &domain->pt_root[PM_LEVEL_INDEX(level, address)]; in alloc_pte()
1237 if (!IOMMU_PTE_PRESENT(*pte)) { in alloc_pte()
1241 *pte = PM_LEVEL_PDE(level, virt_to_phys(page)); in alloc_pte()
1245 if (PM_PTE_LEVEL(*pte) != level) in alloc_pte()
1250 pte = IOMMU_PTE_PAGE(*pte); in alloc_pte()
1253 *pte_page = pte; in alloc_pte()
1255 pte = &pte[PM_LEVEL_INDEX(level, address)]; in alloc_pte()
1258 return pte; in alloc_pte()
1270 u64 *pte; in fetch_pte() local
1276 pte = &domain->pt_root[PM_LEVEL_INDEX(level, address)]; in fetch_pte()
1282 if (!IOMMU_PTE_PRESENT(*pte)) in fetch_pte()
1286 if (PM_PTE_LEVEL(*pte) == 7 || in fetch_pte()
1287 PM_PTE_LEVEL(*pte) == 0) in fetch_pte()
1291 if (PM_PTE_LEVEL(*pte) != level) in fetch_pte()
1297 pte = IOMMU_PTE_PAGE(*pte); in fetch_pte()
1298 pte = &pte[PM_LEVEL_INDEX(level, address)]; in fetch_pte()
1302 if (PM_PTE_LEVEL(*pte) == 0x07) { in fetch_pte()
1309 *page_size = pte_mask = PTE_PAGE_SIZE(*pte); in fetch_pte()
1311 pte = (u64 *)(((unsigned long)pte) & pte_mask); in fetch_pte()
1314 return pte; in fetch_pte()
1330 u64 __pte, *pte; in iommu_map_page() local
1340 pte = alloc_pte(dom, bus_addr, page_size, NULL, GFP_KERNEL); in iommu_map_page()
1342 if (!pte) in iommu_map_page()
1346 if (IOMMU_PTE_PRESENT(pte[i])) in iommu_map_page()
1361 pte[i] = __pte; in iommu_map_page()
1374 u64 *pte; in iommu_unmap_page() local
1382 pte = fetch_pte(dom, bus_addr, &unmap_size); in iommu_unmap_page()
1384 if (pte) { in iommu_unmap_page()
1389 pte[i] = 0ULL; in iommu_unmap_page()
1469 u64 *pte, *pte_page; in alloc_new_range() local
1472 pte = alloc_pte(&dma_dom->domain, address, PAGE_SIZE, in alloc_new_range()
1474 if (!pte) in alloc_new_range()
1521 u64 *pte = fetch_pte(&dma_dom->domain, i, &pte_pgsize); in alloc_new_range() local
1522 if (!pte || !IOMMU_PTE_PRESENT(*pte)) in alloc_new_range()
2370 u64 *pte, *pte_page; in dma_ops_get_pte() local
2376 pte = aperture->pte_pages[APERTURE_PAGE_INDEX(address)]; in dma_ops_get_pte()
2377 if (!pte) { in dma_ops_get_pte()
2378 pte = alloc_pte(&dom->domain, address, PAGE_SIZE, &pte_page, in dma_ops_get_pte()
2382 pte += PM_LEVEL_INDEX(0, address); in dma_ops_get_pte()
2386 return pte; in dma_ops_get_pte()
2398 u64 *pte, __pte; in dma_ops_domain_map() local
2404 pte = dma_ops_get_pte(dom, address); in dma_ops_domain_map()
2405 if (!pte) in dma_ops_domain_map()
2417 WARN_ON(*pte); in dma_ops_domain_map()
2419 *pte = __pte; in dma_ops_domain_map()
2431 u64 *pte; in dma_ops_domain_unmap() local
2440 pte = aperture->pte_pages[APERTURE_PAGE_INDEX(address)]; in dma_ops_domain_unmap()
2441 if (!pte) in dma_ops_domain_unmap()
2444 pte += PM_LEVEL_INDEX(0, address); in dma_ops_domain_unmap()
2446 WARN_ON(!*pte); in dma_ops_domain_unmap()
2448 *pte = 0ULL; in dma_ops_domain_unmap()
3118 u64 *pte, __pte; in amd_iommu_iova_to_phys() local
3123 pte = fetch_pte(domain, iova, &pte_pgsize); in amd_iommu_iova_to_phys()
3125 if (!pte || !IOMMU_PTE_PRESENT(*pte)) in amd_iommu_iova_to_phys()
3129 __pte = *pte & PM_ADDR_MASK; in amd_iommu_iova_to_phys()
3407 u64 *pte; in __get_gcr3_pte() local
3412 pte = &root[index]; in __get_gcr3_pte()
3417 if (!(*pte & GCR3_VALID)) { in __get_gcr3_pte()
3425 *pte = __pa(root) | GCR3_VALID; in __get_gcr3_pte()
3428 root = __va(*pte & PAGE_MASK); in __get_gcr3_pte()
3433 return pte; in __get_gcr3_pte()
3439 u64 *pte; in __set_gcr3() local
3444 pte = __get_gcr3_pte(domain->gcr3_tbl, domain->glx, pasid, true); in __set_gcr3()
3445 if (pte == NULL) in __set_gcr3()
3448 *pte = (cr3 & PAGE_MASK) | GCR3_VALID; in __set_gcr3()
3455 u64 *pte; in __clear_gcr3() local
3460 pte = __get_gcr3_pte(domain->gcr3_tbl, domain->glx, pasid, false); in __clear_gcr3()
3461 if (pte == NULL) in __clear_gcr3()
3464 *pte = 0; in __clear_gcr3()