iommu_set_fault_handler(9)
π iommu_set_fault_handler β like, the kernel API manual, section 9, bestie π
Okay so picture this: it's a kernel API manual page, section 9, and the star of the show is iommu_set_fault_handler. Buckle up, we're getting into IOMMU lore π
β¨ NAME β¨
iommu_set_fault_handler β set a fault handler for an iommu domain π¦
πΈ SYNOPSIS πΈ
void iommu_set_fault_handler (struct iommu_domain *domain ,
iommu_fault_handler_t handler , void *token );
That's it, that's the whole signature. Slay π
π ARGUMENTS π
domainβ the iommu domain in question, your main character β¨handlerβ the fault handler itself, the one who gets the call π₯tokenβ user data, and it will be passed back to the fault handler (yes, it comes back to you, it's giving boomerang energy πͺπ)
π DESCRIPTION π
Okay so here's the vibe: this function should be used by IOMMU users who want to be notified whenever an IOMMU fault happens. Like, they want the gossip the moment it drops, no cap π£
And about the fault handler itself β it should return 0 on success, and an appropriate error code otherwise. That's the whole deal, fr fr π
π SEE ALSO π
The kernel file ./drivers/iommu/iommu.c, plus this absolutely iconic friend group of functions:
iommu_device_register(9)iommu_insert_resv_region(9)iommu_group_alloc(9)iommu_group_get_iommudata(9)iommu_group_set_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_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)
Not a single one skipped, we respect the whole roster π«Άβ
π lowkey a whole reading list, but you're built for this, bestie
And that's the page!! It lives in ./drivers/iommu, dated October 2026 β so go forth, set that fault handler, and remember: you ate. 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