iommu_group_set_iommudata(9)
π iommu_group_set_iommudata β like, the kernel API manual page for it, bestie
okay so real talk: this is from the Kernel API Manual, the whole page is iommu_group_set_iommudata(9), and it's about stashing your own lil data blob on an iommu group. tiny page, immaculate vibes, let's go π
β¨ NAME β¨
iommu_group_set_iommudata β set iommu_data for a group π«Ά
πΈ SYNOPSIS πΈ
void iommu_group_set_iommudata (struct iommu_group *group , void
*iommu_data , void (*release)(void *iommu_data) );
like yes it's one line of C and yes it's lowkey gorgeous π
π¦ ARGUMENTS π¦
groupβ the group. the actual star of the show, the main character, the group.iommu_dataβ new data. the fresh stuff you're putting in there β¨releaseβ release function foriommu_data. so like, the cleanup handler for your data, the one that gets called to let it go π
π DESCRIPTION π
so here's the tea: iommu drivers can store data in the group for use when doing iommu operations. iconic behavior, honestly.
this function provides a way to set the data after the group has been allocated β which is the whole point, right, because sometimes you can't do it up front, and that's fine, we're not judging π
β οΈ important bestie caveat: the caller should hold a group reference. that's not optional energy, that's the rules. don't be out here setting data on a group you don't have a reference to, fr fr π
π SEE ALSO π
- Kernel file
./drivers/iommu/iommu.c
and the whole friend group, in order, no skips, no cap:
iommu_device_register(9)iommu_insert_resv_region(9)iommu_group_alloc(9)iommu_group_get_iommudata(9)iommu_group_set_name(9)iommu_group_add_device(9)iommu_group_remove_device(9)iommu_group_mutex_assert(9)iommu_group_for_each_dev(9)iommu_group_get(9)iommu_group_ref_get(9)iommu_group_put(9)iommu_group_id(9)device_iommu_capable(9)iommu_group_has_isolated_msi(9)iommu_set_fault_handler(9)iommu_paging_domain_alloc_flags(9)iommu_attach_device(9)iommu_get_domain_for_dev(9)iommu_driver_get_domain_for_dev(9)iommu_attach_group(9)iommu_unmap(9)iommu_unmap_fast(9)report_iommu_fault(9)iommu_get_resv_regions(9)iommu_put_resv_regions(9)iommu_setup_default_domain(9)iommu_device_use_default_domain(9)iommu_device_unuse_default_domain(9)iommu_group_claim_dma_owner(9)iommu_device_claim_dma_owner(9)iommu_group_release_dma_owner(9)iommu_device_release_dma_owner(9)iommu_group_dma_owner_claimed(9)iommu_replace_device_pasid(9)iommu_attach_handle_get(9)iommu_attach_group_handle(9)iommu_detach_group_handle(9)iommu_replace_group_handle(9)pci_dev_reset_iommu_prepare(9)pci_dev_reset_iommu_done(9)iommu_dma_prepare_msi(9)
and that's the whole page, bestie β go forth and set that iommu_data, but hold that reference first, iykyk π
mwah π this lil number lives in ./drivers/iommu, dated October 2026 β catch you in the next release, slay π
π¦ 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