pt_upper_range(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… pt_upper_range β€” wait, bestie, this is the manual for it

okay so real talk, we're in the Kernel API Manual today and the star of the show is pt_upper_range(9). yes, a whole manpage, for one lil function. she's iconic like that πŸŽ€


✨ NAME ✨

pt_upper_range β€” returns a range that spans part of the top level. yep, part of it, not the whole thing, depending on how the vibes (okay, the feature flags) are set πŸ¦‹


🌸 SYNOPSIS 🌸

struct pt_range pt_upper_range (struct pt_common *common );

that's it. that's the whole call. one argument, returns a struct pt_range, we love a low-maintenance queen πŸ‘‘


🫢 ARGUMENTS 🫢

  • common β€” the table. that's the whole description in the original and honestly? respect the brevity. it's the table, bestie, hand it over πŸ’–

πŸ’… DESCRIPTION πŸ’…

okay so here's the tea β˜•

for PT_FEAT_SIGN_EXTEND this returns the upper range, and it covers half the total page table. literally half. 50%. a whole 0.5 of the page table, no cap.

otherwise β€” like, if that feature isn't in the picture β€” it just returns the entire page table. the whole thing. all of it. main character range energy πŸ‘‘

so like, tl;dr: sometimes you get half, sometimes you get everything. depends on PT_FEAT_SIGN_EXTEND. check before you assume, iykyk 🀞


🌈 SEE ALSO 🌈

okay this list is long, buckle up bestie, we're going on a tour of the whole pt family 🧚✨

kernel file ./drivers/iommu/generic_pt/pt_iter.h β€” that's where the magic lives, go read it, she's gorgeous πŸ’œ

and then all of these icons:

go click through them like it's a playlist, fr fr 🎧πŸ”₯


ngl the entire vibe of this page is "small function, big range energy". go read the neighbours, they explain the ecosystem πŸ’–

okay that's the whole page, we ate and left no crumbs πŸ“

she ships out of ./drivers/iommu/generic_pt, dated October 2026 β€” like, the version stamp is literally part of the lore, periodt πŸŽ€ pt_upper_range(9) forever, mwah πŸ’‹

πŸ“¦ where this page comes from