hl_mmu_hr_write_pte(9)
π hl_mmu_hr_write_pte β a whole section 9 moment
Okay bestie, welcome to the hl_mmu_hr_write_pte page from the Kernel API Manual β this is the one that literally just writes an HR PTE. That's it. That's the whole gig. No cap. π
β¨ NAME β¨
hl_mmu_hr_write_pte β write HR PTE ποΈβ¨
πΈ SYNOPSIS πΈ
void hl_mmu_hr_write_pte (struct hl_ctx *ctx , struct pgt_info *pgt_info
, u64 phys_pte_addr , u64 val , u32 hop_table_size );
Notice it returns void β she gives nothing back, she's just here to do the thing. Main character energy fr fr. π
π¦ ARGUMENTS π¦
The way this function has five arguments and every single one matters, iykyk:
ctxβ pointer to the context structure π«Ά your whole vibe/state, basically.pgt_infoβ HOP's page table info structure π the receipts for the page table.phys_pte_addrβ phys PTE address π the physical spot where the PTE lives. Not virtual. Phys. Do not come for her with a virtual address, she will not know her.valβ raw PTE data π§ the actual bytes getting written, unprocessed, straight-up raw.hop_table_sizeβ HOP table size π how big the HOP table is. She needs to know.
π SEE ALSO π
The kernel file this lives in, for when you wanna go read the source like the little researcher you are:
./drivers/accel/habanalabs/common/mmu/mmu.c
And the whole friend group β the MMU/HOP squad π§β¨:
hl_mmu_get_funcs(9)hl_mmu_init(9)hl_mmu_fini(9)hl_mmu_ctx_init(9)hl_mmu_scramble_addr(9)hl_mmu_descramble_addr(9)hl_mmu_get_hop_pte_phys_addr(9)hl_mmu_hr_pool_destroy(9)hl_mmu_hr_init(9)hl_mmu_hr_fini(9)hl_mmu_hr_free_hop_remove_pgt(9)hl_mmu_hr_pte_phys_to_virt(9)hl_mmu_hr_clear_pte(9)hl_mmu_hr_put_pte(9)hl_mmu_hr_get_pte(9)hl_mmu_hr_get_next_hop_pgt_info(9)hl_mmu_hr_alloc_hop(9)hl_mmu_hr_get_alloc_next_hop(9)hl_mmu_hr_get_tlb_info(9)
Okay that's the whole page bestie, go write your PTE π
Sign-off szn: this iconic lil page comes from ./drivers/accel/habanalabs/com... (the path got a lil truncated, she's mysterious like that π), dated October 2026, and yes β it's hl_mmu_hr_write_pte(9) all the way at the bottom too. Periodt. π
β
π¦ 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