dma_map_host_va(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– dma_map_host_va(9) β€” like, the whole kernel API manual vibe πŸ’–

okay bestie, welcome to the dma_map_host_va page from the Kernel API Manual β€” yes that's the manual name, we're being official today πŸ’… this one is short and sweet and honestly kind of iconic: it's the girl that takes a host virtual address and makes it DMA-mappable. slay.


✨ NAME ✨

dma_map_host_va β€” DMA mapping of the given host virtual address. that's it, that's the whole personality πŸŽ€


🌸 SYNOPSIS 🌸

int dma_map_host_va (struct hl_device *hdev , u64 addr , u64 size ,
struct hl_userptr **p_userptr );

no cap, that's the exact signature β€” don't come for me about the spacing, it's verbatim πŸ™ˆ


πŸ¦‹ ARGUMENTS πŸ¦‹

  • hdev β€” the habanalabs device structure. like, the device we're doing all this for 🫢
  • addr β€” the host virtual address of the memory area. the starting point of the vibe ✨
  • size β€” the size of the memory area. how much memory we're talking about, bestie πŸ“
  • p_userptr β€” pointer to result userptr structure. this is where the answer lands when we're done πŸŽ€

πŸ’œ DESCRIPTION πŸ’œ

so here's the tea β€” this function does the following, in order, no skipping:

  • Allocate userptr structure. 🧚
  • Pin the given host memory using the userptr structure. πŸ“Œ
  • Perform DMA mapping to have the DMA addresses of the pages. πŸ”₯

three steps, three vibes, one function. it's giving "small but mighty" and honestly? obsessed. πŸ’…


🌈 SEE ALSO 🌈

if you liked this one, the whole friend group is right here β€” literally all of them:

like, the entire extended cast. iykyk 🌟


and that's the page, bestie 🫢 this little manual lives in ./drivers/accel/habanalabs/common, stamped October 2026 β€” that's the source and date, noted with love, not copy-pasted, periodt. πŸ’–πŸŒ·β­

πŸ“¦ where this page comes from