Lines Matching full:child

48  * left-most child, and its siblings.  The node understands its position in the
53 * for that node's child at index $i$ is the i'th uint64_t in that node's entry
76 * Each node contains pointers to its parent, its left-most child, and its
330 * child of our parent's next sibling (if the parent is not the in vmm_gpt_node_next()
352 * Finds the child for the given GPA in the given parent node.
359 for (vmm_gpt_node_t *child = parent->vgn_children; in vmm_gpt_node_find_child() local
360 child != NULL && child->vgn_index <= index; in vmm_gpt_node_find_child()
361 child = child->vgn_sib_next) { in vmm_gpt_node_find_child()
362 if (child->vgn_index == index) in vmm_gpt_node_find_child()
363 return (child); in vmm_gpt_node_find_child()
370 * Add a child node to the GPT at a position determined by GPA, parent, and (if
374 * a pointer to the node preceding (by GPA) the to-be-added child node.
378 vmm_gpt_node_t *child, uint64_t gpa, vmm_gpt_node_t *prev_sibling) in vmm_gpt_node_add() argument
381 ASSERT3U(child->vgn_parent, ==, NULL); in vmm_gpt_node_add()
384 child->vgn_index = idx; in vmm_gpt_node_add()
385 child->vgn_level = parent->vgn_level + 1; in vmm_gpt_node_add()
386 child->vgn_gpa = gpa & vmm_gpt_lvl_mask(parent->vgn_level); in vmm_gpt_node_add()
389 child->vgn_parent = parent; in vmm_gpt_node_add()
391 ASSERT3U(prev_sibling->vgn_gpa, <, child->vgn_gpa); in vmm_gpt_node_add()
393 child->vgn_sib_next = prev_sibling->vgn_sib_next; in vmm_gpt_node_add()
394 if (child->vgn_sib_next != NULL) { in vmm_gpt_node_add()
395 child->vgn_sib_next->vgn_sib_prev = child; in vmm_gpt_node_add()
397 child->vgn_sib_prev = prev_sibling; in vmm_gpt_node_add()
398 prev_sibling->vgn_sib_next = child; in vmm_gpt_node_add()
402 ASSERT3U(next_sibling->vgn_gpa, >, child->vgn_gpa); in vmm_gpt_node_add()
405 child->vgn_sib_next = next_sibling; in vmm_gpt_node_add()
406 child->vgn_sib_prev = NULL; in vmm_gpt_node_add()
407 next_sibling->vgn_sib_prev = child; in vmm_gpt_node_add()
408 parent->vgn_children = child; in vmm_gpt_node_add()
410 parent->vgn_children = child; in vmm_gpt_node_add()
411 child->vgn_sib_next = NULL; in vmm_gpt_node_add()
412 child->vgn_sib_prev = NULL; in vmm_gpt_node_add()
415 /* Configure PTE for child table */ in vmm_gpt_node_add()
417 gpt->vgpt_pte_ops->vpeo_map_table(child->vgn_host_pfn); in vmm_gpt_node_add()
422 * Remove a child node from its relatives (parent, siblings) and free it.
425 vmm_gpt_node_remove(vmm_gpt_node_t *child) in vmm_gpt_node_remove() argument
427 ASSERT3P(child->vgn_children, ==, NULL); in vmm_gpt_node_remove()
428 ASSERT3U(child->vgn_ref_cnt, ==, 0); in vmm_gpt_node_remove()
429 ASSERT3P(child->vgn_parent, !=, NULL); in vmm_gpt_node_remove()
431 /* Unlink child from its siblings and parent */ in vmm_gpt_node_remove()
432 vmm_gpt_node_t *parent = child->vgn_parent; in vmm_gpt_node_remove()
433 vmm_gpt_node_t *prev = child->vgn_sib_prev; in vmm_gpt_node_remove()
434 vmm_gpt_node_t *next = child->vgn_sib_next; in vmm_gpt_node_remove()
436 ASSERT3P(prev->vgn_sib_next, ==, child); in vmm_gpt_node_remove()
440 ASSERT3P(next->vgn_sib_prev, ==, child); in vmm_gpt_node_remove()
444 ASSERT3P(parent->vgn_children, ==, child); in vmm_gpt_node_remove()
447 child->vgn_parent = NULL; in vmm_gpt_node_remove()
448 child->vgn_sib_next = NULL; in vmm_gpt_node_remove()
449 child->vgn_sib_prev = NULL; in vmm_gpt_node_remove()
450 parent->vgn_entries[child->vgn_index] = 0; in vmm_gpt_node_remove()
453 vmm_gpt_node_free(child); in vmm_gpt_node_remove()
616 * Populate child table nodes for a given level between the provided interval
618 * node which would contain the child node for GPA at `addr`. A pointer to said
619 * child node will be returned when the operation is complete.