Lines Matching defs:level
8 * Recalculates the pointer to the SPTE for the current GFN and level and
13 iter->sptep = iter->pt_path[iter->level - 1] +
14 SHADOW_PT_INDEX(iter->gfn << PAGE_SHIFT, iter->level);
18 static gfn_t round_gfn_for_level(gfn_t gfn, int level)
20 return gfn & -KVM_PAGES_PER_HPAGE(level);
37 iter->level = root_level;
38 iter->pt_path[iter->level - 1] = root_pt;
40 iter->gfn = round_gfn_for_level(iter->next_last_level_gfn, iter->level);
47 * Given an SPTE and its level, returns a pointer containing the host virtual
51 u64 *spte_to_child_pt(u64 spte, int level)
55 * last-level entry.
57 if (!is_shadow_present_pte(spte) || is_last_spte(spte, level))
64 * Steps down one level in the paging structure towards the goal GFN. Returns
65 * true if the iterator was able to step down a level, false otherwise.
71 if (iter->level == iter->min_level)
80 child_pt = spte_to_child_pt(iter->old_spte, iter->level);
84 iter->level--;
85 iter->pt_path[iter->level - 1] = child_pt;
86 iter->gfn = round_gfn_for_level(iter->next_last_level_gfn, iter->level);
94 * level. The next entry could point to a page backing guest memory or another
105 if (SHADOW_PT_INDEX(iter->gfn << PAGE_SHIFT, iter->level) ==
109 iter->gfn += KVM_PAGES_PER_HPAGE(iter->level);
118 * Tries to traverse back up a level in the paging structure so that the walk
124 if (iter->level == iter->root_level)
127 iter->level++;
128 iter->gfn = round_gfn_for_level(iter->gfn, iter->level);
137 * GFN, if at a present, non-last-level SPTE, or over to a SPTE mapping a
141 * 1. If the current SPTE is a non-last-level SPTE, step down into the page