Lines Matching +full:pre +full:- +full:its

1 // SPDX-License-Identifier: GPL-2.0
14 iter->sptep = iter->pt_path[iter->level - 1] + in tdp_iter_refresh_sptep()
15 SPTE_INDEX(iter->gfn << PAGE_SHIFT, iter->level); in tdp_iter_refresh_sptep()
16 iter->old_spte = kvm_tdp_mmu_read_spte(iter->sptep); in tdp_iter_refresh_sptep()
20 * Return the TDP iterator to the root PT and allow it to continue its
25 iter->yielded = false; in tdp_iter_restart()
26 iter->yielded_gfn = iter->next_last_level_gfn; in tdp_iter_restart()
27 iter->level = iter->root_level; in tdp_iter_restart()
29 iter->gfn = gfn_round_for_level(iter->next_last_level_gfn, iter->level); in tdp_iter_restart()
32 iter->valid = true; in tdp_iter_restart()
36 * Sets a TDP iterator to walk a pre-order traversal of the paging structure
42 if (WARN_ON_ONCE(!root || (root->role.level < 1) || in tdp_iter_start()
43 (root->role.level > PT64_ROOT_MAX_LEVEL))) { in tdp_iter_start()
44 iter->valid = false; in tdp_iter_start()
48 iter->next_last_level_gfn = next_last_level_gfn; in tdp_iter_start()
49 iter->root_level = root->role.level; in tdp_iter_start()
50 iter->min_level = min_level; in tdp_iter_start()
51 iter->pt_path[iter->root_level - 1] = (tdp_ptep_t)root->spt; in tdp_iter_start()
52 iter->as_id = kvm_mmu_page_as_id(root); in tdp_iter_start()
58 * Given an SPTE and its level, returns a pointer containing the host virtual
66 * last-level entry. in spte_to_child_pt()
82 if (iter->level == iter->min_level) in try_step_down()
89 iter->old_spte = kvm_tdp_mmu_read_spte(iter->sptep); in try_step_down()
91 child_pt = spte_to_child_pt(iter->old_spte, iter->level); in try_step_down()
95 iter->level--; in try_step_down()
96 iter->pt_path[iter->level - 1] = child_pt; in try_step_down()
97 iter->gfn = gfn_round_for_level(iter->next_last_level_gfn, iter->level); in try_step_down()
106 * page table, or it could be non-present. Returns true if the iterator was
116 if (SPTE_INDEX(iter->gfn << PAGE_SHIFT, iter->level) == in try_step_side()
117 (SPTE_ENT_PER_PAGE - 1)) in try_step_side()
120 iter->gfn += KVM_PAGES_PER_HPAGE(iter->level); in try_step_side()
121 iter->next_last_level_gfn = iter->gfn; in try_step_side()
122 iter->sptep++; in try_step_side()
123 iter->old_spte = kvm_tdp_mmu_read_spte(iter->sptep); in try_step_side()
135 if (iter->level == iter->root_level) in try_step_up()
138 iter->level++; in try_step_up()
139 iter->gfn = gfn_round_for_level(iter->gfn, iter->level); in try_step_up()
146 * Step to the next SPTE in a pre-order traversal of the paging structure.
148 * GFN, if at a present, non-last-level SPTE, or over to a SPTE mapping a
152 * 1. If the current SPTE is a non-last-level SPTE, step down into the page
163 if (iter->yielded) { in tdp_iter_next()
175 iter->valid = false; in tdp_iter_next()