Module node

Source
Expand description

This module defines page table node abstractions and the handle.

The page table node is also frequently referred to as a page table in many architectural documentations. It is essentially a page that contains page table entries (PTEs) that map to child page tables nodes or mapped pages.

This module leverages the page metadata to manage the page table pages, which makes it easier to provide the following guarantees:

The page table node is not freed when it is still in use by:

  • a parent page table node,
  • or a handle to a page table node,
  • or a processor.

This is implemented by using a reference counter in the page metadata. If the above conditions are not met, the page table node is ensured to be freed upon dropping the last reference.

One can acquire exclusive access to a page table node using merely the physical address of the page table node. This is implemented by a lock in the page metadata. Here the exclusiveness is only ensured for kernel code, and the processor’s MMU is able to access the page table node while a lock is held. So the modification to the PTEs should be done after the initialization of the entity that the PTE points to. This is taken care in this module.

Modules§

child 🔒
This module specifies the type of the children of a page table node.
entry 🔒
This module provides accessors to the page table entries in a node.

Structs§

PageTableGuard 🔒
A guard that holds the lock of a page table node.
PageTablePageMeta 🔒
The metadata of any kinds of page table pages. Make sure the the generic parameters don’t effect the memory layout.

Type Aliases§

PageTableNode 🔒
A smart pointer to a page table node.
PageTableNodeRef 🔒
A reference to a page table node.