pt_clear_entries(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… pt_clear_entries β€” a Kernel API Manual moment

okay so bestie, we're in the kernel API manual, and today's main character is pt_clear_entries(9). she's a void function, she returns nothing, and she's here to hand you a freshly emptied run of page-table entries. no cap. ✨


🌸 NAME 🌸

pt_clear_entries β€” makes entries empty (non-present). literally just yeets the contents and leaves you with a blank slate, iykyk 🫢


πŸŽ€ SYNOPSIS πŸŽ€

void pt_clear_entries (struct pt_state *pts , unsigned int
num_contig_lg2 );

bestie look at her. void return, two args, no notes. πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

  • pts β€” the starting table index πŸ’– like, where the clearing begins. that's the vibe.
  • num_contig_lg2 β€” the number of contiguous items to clear 🌈 (yes it's log2-flavored, the name is telling you that itself, we love a self-documenting parameter).

🧚 DESCRIPTION 🧚

so what does she actually do? she clears a run of entries. that's it, that's the whole gig. πŸ”₯

here's the part that matters though β€” a cleared entry will load back as PT_ENTRY_EMPTY, and it does not have any effect on table walking. so the walker just strolls right past it like it's not even there. iconic behavior honestly. πŸ’€

⚠️ okay this is the important bit, don't skip it: the starting index must be aligned to num_contig_lg2. like, that's a hard requirement, not a suggestion. misaligned starting index? that's a you problem, bestie. 😭

⭐ SEE ALSO ⭐

the kernel file lives at ./drivers/iommu/generic_pt/pt_common.h β€” that's the whole squad's hangout spot πŸ’œ

and here's the full friend group, go say hi:


and that's the page, bestie πŸŽ€ this whole thing ships out of ./drivers/iommu/generic_pt and it's dated October 2026 β€” so yeah, she's from the future, we stan a forward-thinking queen. periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from