pt_install_table(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… pt_install_table(9) β€” like, the kernel API manual edition, bestie πŸŽ€

okay so real talk, we're deep in the kernel weeds today β€” this is pt_install_table, straight out of the Kernel API Manual, and yes it's exactly as iconic as it sounds. grab a lil snack πŸ“ and let's get into it.


✨ NAME ✨

pt_install_table β€” literally just writes a table entry into the table. that's the whole vibe. πŸ’«


🌸 SYNOPSIS 🌸

bool pt_install_table (struct pt_state *pts , pt_oaddr_t table_pa ,
const struct pt_write_attrs *attrs );

look at her. so clean. so composed. 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • pts β€” the table index you're changing. this is the main character right here πŸ‘‘
  • table_pa β€” the CPU physical address of the lower table's memory. it's giving "address of the downstairs neighbor" ngl
  • attrs β€” the attributes you're using to modify that table index ✨

πŸ’œ DESCRIPTION πŸ’œ

so here's the tea β˜• β€” once you install this, a table entry will return PT_ENTRY_TABLE from pt_load_entry. no cap.

the table_pa is the table sitting at pts->level - 1. like, one level down, that's her. πŸ“‰

this whole thing gets done via cmpxchg, which means pts must have the current entry loaded first β€” don't skip that step bestie, it's not optional, fr fr. πŸ™ˆ and then pts gets updated with the installed entry, so she stays in sync. slay.

🚨 BIG WARNING ENERGY 🚨: you must not call this if pt_can_have_table == false. like, just don't. it's giving "read the room" energy. πŸ’€

⭐ RETURN ⭐

returns true if the table was installed successfully. that's the good ending. 🌈


πŸ”₯ SEE ALSO πŸ”₯

that's the whole friend group right there, iykyk πŸ’–


aaand that's the page!! this lil masterpiece lives in ./drivers/iommu/generic_pt and it's dated October 2026 β€” she's from the future, main character energy only πŸ‘‘βœ¨ bye bestie, go install some tables πŸŽ€πŸ’…

πŸ“¦ where this page comes from