Lines Matching refs:ptep

92 	uint64_t *ptep;  in _virt_pg_map()  local
108 ptep = addr_gpa2hva(vm, vm->pgd) + pgd_index(vm, vaddr) * 8; in _virt_pg_map()
109 if (!*ptep) in _virt_pg_map()
110 *ptep = vm_alloc_page_table(vm) | 3; in _virt_pg_map()
114 ptep = addr_gpa2hva(vm, pte_addr(vm, *ptep)) + pud_index(vm, vaddr) * 8; in _virt_pg_map()
115 if (!*ptep) in _virt_pg_map()
116 *ptep = vm_alloc_page_table(vm) | 3; in _virt_pg_map()
119 ptep = addr_gpa2hva(vm, pte_addr(vm, *ptep)) + pmd_index(vm, vaddr) * 8; in _virt_pg_map()
120 if (!*ptep) in _virt_pg_map()
121 *ptep = vm_alloc_page_table(vm) | 3; in _virt_pg_map()
124 ptep = addr_gpa2hva(vm, pte_addr(vm, *ptep)) + pte_index(vm, vaddr) * 8; in _virt_pg_map()
130 *ptep = paddr | 3; in _virt_pg_map()
131 *ptep |= (attr_idx << 2) | (1 << 10) /* Access Flag */; in _virt_pg_map()
143 uint64_t *ptep; in addr_gva2gpa() local
148 ptep = addr_gpa2hva(vm, vm->pgd) + pgd_index(vm, gva) * 8; in addr_gva2gpa()
149 if (!ptep) in addr_gva2gpa()
154 ptep = addr_gpa2hva(vm, pte_addr(vm, *ptep)) + pud_index(vm, gva) * 8; in addr_gva2gpa()
155 if (!ptep) in addr_gva2gpa()
159 ptep = addr_gpa2hva(vm, pte_addr(vm, *ptep)) + pmd_index(vm, gva) * 8; in addr_gva2gpa()
160 if (!ptep) in addr_gva2gpa()
164 ptep = addr_gpa2hva(vm, pte_addr(vm, *ptep)) + pte_index(vm, gva) * 8; in addr_gva2gpa()
165 if (!ptep) in addr_gva2gpa()
172 return pte_addr(vm, *ptep) + (gva & (vm->page_size - 1)); in addr_gva2gpa()
183 uint64_t pte, *ptep; in pte_dump() local
189 ptep = addr_gpa2hva(vm, pte); in pte_dump()
190 if (!*ptep) in pte_dump()
192 fprintf(stream, "%*s%s: %lx: %lx at %p\n", indent, "", type[level], pte, *ptep, ptep); in pte_dump()
193 pte_dump(stream, vm, indent + 1, pte_addr(vm, *ptep), level + 1); in pte_dump()
201 uint64_t pgd, *ptep; in virt_dump() local
207 ptep = addr_gpa2hva(vm, pgd); in virt_dump()
208 if (!*ptep) in virt_dump()
210 fprintf(stream, "%*spgd: %lx: %lx at %p\n", indent, "", pgd, *ptep, ptep); in virt_dump()
211 pte_dump(stream, vm, indent + 1, pte_addr(vm, *ptep), level); in virt_dump()