iommufd_device_detach(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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:

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