pt_possible_sizes(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

Okay bestie, this is pt_possible_sizes(9) from the Kernel API Manual, and it's literally here to tell you which output sizes this level can even put on the menu. πŸ’…βœ¨

🌸 NAME 🌸

pt_possible_sizes β€” return a bitmap of possible output sizes at this level. πŸŽ€

✨ SYNOPSIS ✨

Here's the signature, character for character, no cap:

pt_vaddr_t pt_possible_sizes (const struct pt_state *pts );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • pts β€” the current level. That's it, that's the argument. 🫢

πŸ’– DESCRIPTION πŸ’–

Okay so, every level has a list of possible output sizes that can be installed as leaf entries. Think of it as the level's own little size menu. πŸ“

If pt_can_have_leaf is false, it returns zero. Full stop, no drama. πŸ’€

Otherwise, the bit in position pt_table_item_lg2sz should be set, indicating that a non-contiguous single item leaf entry is supported. ✨ Then the following pt_num_items_lg2 number of bits can be set, indicating contiguous entries are supported. Those bits are lowkey saying β€œyes, contiguous entries are welcome here.” πŸ¦‹

🚨 But the bit at pt_table_item_lg2sz + pt_num_items_lg2 must not be set. Contiguous entries cannot span the entire table. That's the rule, periodt. πŸ’…

The OR of pt_possible_sizes of all levels is the typical bitmask of all supported sizes in the entire table. So you OR the whole squad together and get the full size menu for the table. πŸ”₯πŸ‘‘

🌈 SEE ALSO 🌈


Source/version is ./drivers/iommu/generic_pt, dated October 2026, and this whole page is for pt_possible_sizes(9) β€” catch you in the group chat, bestie! πŸ’–πŸ‘‘

πŸ“¦ where this page comes from