iommufd_access_rw(9)
π 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 frflagsβ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:
iommufd_device_bind(9)iommufd_ctx_has_group(9)iommufd_device_unbind(9)iommufd_device_attach(9)iommufd_device_replace(9)iommufd_device_detach(9)iommufd_access_create(9)iommufd_access_destroy(9)iommufd_access_notify_unmap(9)iommufd_access_unpin_pages(9)iommufd_access_pin_pages(9)
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
- 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