iommufd_device_bind(9)
iommufd_device_bind(9) π
okay so welcome to the Kernel API Manual page for iommufd_device_bind(9) β the routine that binds a physical device to an iommu fd. bestie, this is your ownership handshake, and it's lowkey important π«Ά
β¨ NAME β¨
iommufd_device_bind β bind a physical device to an iommu fd. that's the whole vibe π
π¦ SYNOPSIS π¦
struct iommufd_device * iommufd_device_bind (struct iommufd_ctx *ictx ,
struct device *dev , u32 *id );
π ARGUMENTS π
ictxβ the iommufd file descriptor. yes, the fd in question.devβ pointer to a physical devicestruct. the actual device bestie.idβ output ID number to return to userspace for this device. it's giving "here's your ID, userspace" π
πΈ DESCRIPTION πΈ
when the bind succeeds, it establishes ownership over the device and gives you back a struct iommufd_device pointer. if it doesn't succeed? you get an error pointer instead. no in-between π
π¨ important: a driver using this API must set driver_managed_dma and must not touch the device until this routine succeeds and establishes ownership. like, do not poke the device before ownership is actually yours, periodt π
binding a PCI device places the entire RID under iommufd control. the whole RID. not a slice, not a snack β the entire thing π
and listen: the caller must undo this with iommufd_device_unbind. no leaving it bound and ghosting it, bestie π
π₯ SEE ALSO π₯
the kernel file is ./drivers/iommu/iommufd/device.c β go peek if you're nosy π
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)iommufd_access_rw(9)
xoxo, your kernel bestie π
β source/version: ./drivers/iommu/iommufd Β· date: October 2026 Β· page: iommufd_device_bind(9) β¨
π¦ 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