iommu_sva_bind_device(9)
β¨ NAME β¨
iommu_sva_bind_device β bind a process address space to a device π
Okay so welcome to a Kernel API Manual classic, bestie: we're binding a process address space to a device, and it's lowkey iconic.
π SYNOPSIS π
struct iommu_sva * iommu_sva_bind_device (struct device *dev , struct mm_struct *mm );
πΈ ARGUMENTS πΈ
devβ the device. That's the whole vibe for this argument πmmβ the mm to bind, and the caller must hold a reference tomm_users. Not optional, not negotiable, no cap π«Ά
π DESCRIPTION π
So this function creates a bond between dev and the address space, allowing the device to access the mm using the PASID returned by iommu_sva_get_pasid. It's giving matchmaker energy for devices and address spaces π₯
If a bond already exists between dev and mm, an additional internal reference is taken. Cute, right? But bestie, the caller must call iommu_sva_unbind_device to release each reference β every single one, periodt π
On error, it returns an ERR_PTR value. So yeah, keep an eye out for that π
π₯ SEE ALSO π₯
- Kernel file
./drivers/iommu/iommu-sva.c iommu_sva_unbind_device(9)
okay bye bestie π β cute sign-off from your ./drivers/iommu source/version, dated October 2026, page iommu_sva_bind_device(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