iommufd_device_attach(9)
okay so bestie, welcome to iommufd_device_attach(9) from the Kernel API Manual β this is the function that connects a device/pasid to an iommu_domain, and it's giving main-character kernel energy π
β¨
π NAME π
iommufd_device_attach β Connect a device/pasid to an iommu_domain. No cap, that's the whole vibe π«Ά
πΈ SYNOPSIS πΈ
int iommufd_device_attach (struct iommufd_device *idev , ioasid_t pasid , u32 *pt_id );
π ARGUMENTS π
idevβ the device to attach, bestie. This is the device side of the glow-up π«pasidβ the pasid to attach. Yes, literally that pasid πpt_idβ input anIOMMUFD_OBJ_IOAS, orIOMMUFD_OBJ_HWPT_PAGING; output theIOMMUFD_OBJ_HWPT_PAGINGID. This pointer is doing double duty, iykyk π
π₯ DESCRIPTION π₯
This connects the device/pasid to an iommu_domain, either automatically or manually selected. Once this completes, the device could do DMA with pasid. pasid is IOMMU_NO_PASID if this attach is for no pasid usage.
The caller should return the resulting pt_id back to userspace. This function is undone by calling iommufd_device_detach. So yeah, remember the undo button, bestie ππ«Ά
π SEE ALSO π
Kernel file ./drivers/iommu/iommufd/device.c β and the whole squad is right here:
iommufd_device_bind(9)iommufd_ctx_has_group(9)iommufd_device_unbind(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)
mwah π this lil page is from source/version ./drivers/iommu/iommufd, dated October 2026, and it's all about iommufd_device_attach(9), periodt π
π¦ 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