iommufd_hwpt_paging_alloc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… iommufd_hwpt_paging_alloc(9) β€” from the Kernel API Manual, bestie

okay so real talk, this one is a function, and it lives in section 9 of the kernel API manual. yes, the fancy one. get comfy πŸŽ€


✨ NAME ✨

iommufd_hwpt_paging_alloc β€” bestie, this is how you get a PAGING iommu_domain for a device. like, that's its whole job. iconic of it honestly πŸ‘‘


🌸 SYNOPSIS 🌸

struct iommufd_hwpt_paging * iommufd_hwpt_paging_alloc (struct
iommufd_ctx *ictx , struct iommufd_ioas *ioas , struct iommufd_device
*idev , ioasid_t pasid , u32 flags , bool immediate_attach , const
struct iommu_user_data *user_data );

look at all those parameters. she has range πŸ’œ


πŸ¦‹ ARGUMENTS πŸ¦‹

  • ictx β€” the iommufd context. the mothership, if you will πŸ›Έ
  • ioas β€” the IOAS you're linking this domain up with. it's giving "we're official now" 🫢
  • idev β€” the device you're grabbing an iommu_domain for. main character device energy πŸ”₯
  • pasid β€” the PASID you're grabbing an iommu_domain for. yes, per-PASID, no cap
  • flags β€” flags coming straight from userspace. whatever they handed you πŸ“₯
  • immediate_attach β€” true if idev should get attached to the hwpt. like, right away. no waiting around ⚑
  • user_data β€” the user-provided, driver-specific data describing the domain you're about to create. it's the blueprint, basically πŸ“

🧚 DESCRIPTION 🧚

So you want a new iommu_domain? Say less. This function allocates one and hands it back to you as a hw_pagetable. The HWPT gets linked to the ioas you passed in, and by the time you get your grubby little hands back on it, the underlying iommu_domain is fully populated β€” like, entirely. done. finished. slay πŸ’…

⚠️ okay this part is important, bestie, don't skip it: the caller must hold the ioas->mutex until after iommufd_object_abort_and_destroy or iommufd_object_finalize has been called on the returned hwpt. that's iommufd_object_abort_and_destroy or iommufd_object_finalize β€” pick whichever one fits, but the mutex stays held through it. no early letting go. hold it. πŸ”’

🌈 SEE ALSO 🌈


kk that's the whole page!! πŸ’– this came out of ./drivers/iommu/iommufd, dated October 2026, and the page itself is iommufd_hwpt_paging_alloc(9) β€” remember the mutex thing, and drink some water. mwah πŸŽ€βœ¨

πŸ“¦ where this page comes from