GENERIC PAGE TABLE LANGUAGE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– Generic Page Table Language (9) πŸ’–

okay bestie, welcome to the Kernel API Manual page for Generic Page Table Language β€” the literal language used in Generic Page Table. this is your group-chat glossary for VA, OA, levels, tables, entries, all of it. no cap 🫢

  • VA β€” the input address to the page table, often the virtual address. πŸ’…
  • OA β€” the output address from the page table, often the physical address. ✨
  • leaf β€” an entry that results in an output address. πŸ“
  • start/end β€” a half-open range, e.g. [0,0) refers to no VA. πŸŽ€
  • start/last β€” an inclusive closed range, e.g. [0,0] refers to the VA 0. πŸ¦‹
  • common β€” the generic page table container struct pt_common. 🧚
  • level β€” Level 0 is always a table of only leaves with no further table pointers. Increasing levels increase the size of the table items. The least significant VA bits used to index page tables are used to index the Level 0 table. The various labels for table levels used by HW descriptions are not used. πŸ‘‘
  • top_level β€” the inclusive highest level of the table. A two-level table has a top level of 1. ⭐
  • table β€” a linear array of translation items for that level. 🌈
  • index β€” the position in a table of an element: item = table[index]. πŸ’œ
  • item β€” a single index in a table. 🌸
  • entry β€” a single logical element in a table. If contiguous pages are not supported then item and entry are the same thing, otherwise entry refers to all the items that comprise a single contiguous translation. πŸ”₯
  • item/entry_size β€” the number of bytes of VA the table index translates for. If the item is a table entry then the next table covers this size. If the entry translates to an output address then the full OA is: OA | (VA % entry_size). πŸ’€
  • contig_count β€” the number of consecutive items fused into a single entry. item_size * contig_count is the size of that entry’s translation. πŸ™ˆ
  • lg2 β€” indicates the value is encoded as log2, i.e. 1<<x is the actual value. Normally the compiler is fine to optimize divide and mod with log2 values automatically when inlining, however if the values are not constant expressions it can’t. So we do it by hand; we want to avoid 64-bit divmod. 😭

πŸ‘€ SEE ALSO πŸ‘€

  • Kernel file ./drivers/iommu/generic_pt/pt_defs.h β€” literally the header, bestie, go peek at it. 🫢

mwah πŸ’‹ source/version vibes: this page comes from ./drivers/iommu/generic_pt, dated October 2026, and it’s Generic Page Table Language(9). byeee ✨

πŸ“¦ where this page comes from