iommufd_device_detach(9)
π iommufd_device_detach β kernel API manual, but make it make sense
okay so bestie, we're in the Kernel API Manual today and the star of the show is iommufd_device_detach(9). yes it's a kernel function, no it's not scary, i promise π«Ά
β¨ NAME β¨
iommufd_device_detach β disconnect a device/pasid from an iommu_domain. that's the whole vibe: it's the breakup function π
π SYNOPSIS π
void iommufd_device_detach (struct iommufd_device *idev , ioasid_t pasid );
literally returns void, so no "did it work?" drama. it just does the thing. slay.
π¦ ARGUMENTS π¦
idevβ the device to detach. this is the one we're breaking up with πpasidβ the pasid to detach. also getting the goodbye text, no cap.
πΈ DESCRIPTION πΈ
so this is the undo button for iommufd_device_attach β it literally reverses it. it disconnects the idev from the pt_id it was previously attached to, and after that the device goes right back to a blocked DMA translation. like, it's grounded. no DMA for you until you get attached again π«
and real talk: pasid is IOMMU_NO_PASID when there's no pasid usage happening. iykyk, that's the no-pasid mood.
π SEE ALSO π
the kernel file lives at ./drivers/iommu/iommufd/device.c and honestly it's the main character of this section. go read it. then go read its friends:
iommufd_device_bind(9)iommufd_ctx_has_group(9)iommufd_device_unbind(9)iommufd_device_attach(9)iommufd_device_replace(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)
that's the whole group chat, fr fr π¬
β οΈ quick vibe check: this is the undo of iommufd_device_attach, and once you detach, the device is back to blocked DMA translation. that's the documented behaviour β don't come for me, i'm just the messenger π
and that's a wrap, bestie π this page came from the source/version line ./drivers/iommu/iommufd and it's dated October 2026, so likeβ¦ future-coded of it honestly β¨ 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