iommufd_access_pin_pages(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ iommufd_access_pin_pages ✨

okay so bestie, welcome to the iommufd_access_pin_pages page from the Kernel API Manual πŸ’– this one's a lil kernel-level baddie that hands you back a whole list of pages sitting under an iova. no cap, it's giving "let me get those pages for you" energy πŸŽ€


🌸 SYNOPSIS 🌸

int iommufd_access_pin_pages (struct iommufd_access *access , unsigned
long iova , unsigned long length , struct page **out_pages , unsigned
int flags );

literally the whole vibe in one line, iykyk πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • access β€” the IOAS access you're acting on, like, the main character here πŸ‘‘
  • iova β€” the starting IOVA, that's where we begin bestie ⭐
  • length β€” how many bytes you wanna access, tell me how much and I'll go get it 🫢
  • out_pages β€” the output page list, this is where the goodies land πŸ“
  • flags β€” the IOPMMUFD_ACCESS_RW_* flags, yeah that's exactly how it's spelled in the source, not me being quirky πŸ’€

πŸ’œ DESCRIPTION πŸ’œ

So what it does: it reads length bytes starting at iova and returns the struct page * pointers. then you (the caller) can kmap them for CPU access. slay πŸ”₯

bestie listen β€” the caller must perform iommufd_access_unpin_pages when done to balance this. it's literally the rule, don't leave it hanging 😭

This API always requires a page aligned iova. no exceptions, periodt. this happens naturally if the ioas alignment is >= PAGE_SIZE and the iova is PAGE_SIZE aligned β€” iconic, love that for you ✨

but lowkey, smaller alignments have corner cases where this API can fail on an otherwise aligned iova. so like, heads up πŸ™ˆ


🌈 SEE ALSO 🌈

Kernel file ./drivers/iommu/iommufd/device.c and honestly the whole friend group:


and that's the whole page bestie β€” brought to you by ./drivers/iommu/iommufd, dated October 2026, page iommufd_access_pin_pages(9), Kernel API Manual edition πŸŒΈπŸ’–πŸŽ€ go pin some pages, you got this πŸ§šπŸ’œ

πŸ“¦ where this page comes from