GENERIC PAGE TABLE LANGUAGE(9)
π 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 noVA. πstart/lastβ an inclusive closed range, e.g.[0,0]refers to theVA0. π¦commonβ the generic page table containerstruct pt_common. π§levelβ Level0is always a table of only leaves with no further table pointers. Increasing levels increase the size of the table items. The least significantVAbits used to index page tables are used to index the Level0table. 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 of1. β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 thenitemandentryare the same thing, otherwiseentryrefers to all the items that comprise a single contiguous translation. π₯item/entry_sizeβ the number of bytes ofVAthe 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 fullOAis:OA | (VA % entry_size). πcontig_countβ the number of consecutive items fused into a single entry.item_size * contig_countis the size of that entryβs translation. πlg2β indicates the value is encoded as log2, i.e.1<<xis 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms