iommufd_access_rw(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… iommufd_access_rw β€” read or write data under the iova

okay so bestie, welcome to the Kernel API Manual ✨ this one is literally iommufd_access_rw, and it's giving "copy bytes to/from an IOVA" energy. it's a function, not a command β€” no cap. let's get into it πŸŽ€


🌸 SYNOPSIS 🌸

int iommufd_access_rw (struct iommufd_access *access , unsigned long
iova , void *data , size_t length , unsigned int flags );

like... look at her. five params. returns an int. iconic behavior honestly πŸ‘‘


✨ ARGUMENTS ✨

  • access β€” the IOAS access you're acting on. this is your main character. everything happens through her 🫢
  • iova β€” the starting IOVA. where the party begins πŸ’–
  • data β€” the kernel buffer you're copying to/from. the actual payload, the substance, the vibe 🌸
  • length β€” how many bytes we're accessing. the size of the moment, fr fr
  • flags β€” IOMMUFD_ACCESS_RW_* flags. literally whatever flags you've got, they go here πŸ¦‹

πŸ¦‹ DESCRIPTION πŸ¦‹

so what does she do? she copies kernel-to/from data into the range that iova/length gives you. simple. clean. the range is the range πŸ’…

and here's the lowkey cool part: if flags indicates IOMMUFD_ACCESS_RW_KTHREAD, then a large copy can get optimized β€” it gets changed into copy_to/from_user instead. the way that just... works. efficiency slay πŸ”₯

ngl this is just the copy helper β€” she's not out here doing the pinning or the notifying, she moves your bytes and that's it. know your lane bestie 😌

πŸŽ€ SEE ALSO πŸŽ€

the whole friend group, in the kernel file ./drivers/iommu/iommufd/device.c:


and that's the whole page, bestie πŸ’– shoutout to the source at ./drivers/iommu/iommufd in the Kernel API Manual, dated October 2026 β€” go forth and copy your bytes responsibly, ily, mwah πŸ˜­πŸ«ΆπŸ’œ

πŸ“¦ where this page comes from