Lines Matching +full:pre +full:- +full:its
1 // SPDX-License-Identifier: GPL-2.0
13 iter->sptep = iter->pt_path[iter->level - 1] + in tdp_iter_refresh_sptep()
14 SPTE_INDEX(iter->gfn << PAGE_SHIFT, iter->level); in tdp_iter_refresh_sptep()
15 iter->old_spte = kvm_tdp_mmu_read_spte(iter->sptep); in tdp_iter_refresh_sptep()
20 return gfn & -KVM_PAGES_PER_HPAGE(level); in round_gfn_for_level()
24 * Return the TDP iterator to the root PT and allow it to continue its
29 iter->yielded = false; in tdp_iter_restart()
30 iter->yielded_gfn = iter->next_last_level_gfn; in tdp_iter_restart()
31 iter->level = iter->root_level; in tdp_iter_restart()
33 iter->gfn = round_gfn_for_level(iter->next_last_level_gfn, iter->level); in tdp_iter_restart()
36 iter->valid = true; in tdp_iter_restart()
40 * Sets a TDP iterator to walk a pre-order traversal of the paging structure
46 int root_level = root->role.level; in tdp_iter_start()
51 iter->next_last_level_gfn = next_last_level_gfn; in tdp_iter_start()
52 iter->root_level = root_level; in tdp_iter_start()
53 iter->min_level = min_level; in tdp_iter_start()
54 iter->pt_path[iter->root_level - 1] = (tdp_ptep_t)root->spt; in tdp_iter_start()
55 iter->as_id = kvm_mmu_page_as_id(root); in tdp_iter_start()
61 * Given an SPTE and its level, returns a pointer containing the host virtual
69 * last-level entry. in spte_to_child_pt()
85 if (iter->level == iter->min_level) in try_step_down()
92 iter->old_spte = kvm_tdp_mmu_read_spte(iter->sptep); in try_step_down()
94 child_pt = spte_to_child_pt(iter->old_spte, iter->level); in try_step_down()
98 iter->level--; in try_step_down()
99 iter->pt_path[iter->level - 1] = child_pt; in try_step_down()
100 iter->gfn = round_gfn_for_level(iter->next_last_level_gfn, iter->level); in try_step_down()
109 * page table, or it could be non-present. Returns true if the iterator was
119 if (SPTE_INDEX(iter->gfn << PAGE_SHIFT, iter->level) == in try_step_side()
120 (SPTE_ENT_PER_PAGE - 1)) in try_step_side()
123 iter->gfn += KVM_PAGES_PER_HPAGE(iter->level); in try_step_side()
124 iter->next_last_level_gfn = iter->gfn; in try_step_side()
125 iter->sptep++; in try_step_side()
126 iter->old_spte = kvm_tdp_mmu_read_spte(iter->sptep); in try_step_side()
138 if (iter->level == iter->root_level) in try_step_up()
141 iter->level++; in try_step_up()
142 iter->gfn = round_gfn_for_level(iter->gfn, iter->level); in try_step_up()
149 * Step to the next SPTE in a pre-order traversal of the paging structure.
151 * GFN, if at a present, non-last-level SPTE, or over to a SPTE mapping a
155 * 1. If the current SPTE is a non-last-level SPTE, step down into the page
166 if (iter->yielded) { in tdp_iter_next()
178 iter->valid = false; in tdp_iter_next()