drivers/vfio/vfio_iommu_spapr_tce.c
Source file repositories/reference/linux-study-clean/drivers/vfio/vfio_iommu_spapr_tce.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/vfio/vfio_iommu_spapr_tce.c- Extension
.c- Size
- 32786 bytes
- Lines
- 1380
- Domain
- Driver Families
- Bucket
- drivers/vfio
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Touches user memory; correctness depends on fault-safe copying and privilege boundary handling.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/pci.hlinux/slab.hlinux/uaccess.hlinux/err.hlinux/vfio.hlinux/vmalloc.hlinux/sched/mm.hlinux/sched/signal.hlinux/mm.hvfio.hasm/iommu.hasm/tce.hasm/mmu_context.h
Detected Declarations
struct tce_iommu_groupstruct tce_iommu_preregstruct tce_containerfunction tce_iommu_mm_setfunction tce_iommu_prereg_freefunction tce_iommu_unregister_pagesfunction list_for_each_entryfunction tce_iommu_register_pagesfunction list_for_each_entryfunction tce_page_is_containedfunction tce_groups_attachedfunction tce_iommu_find_tablefunction tce_iommu_find_free_tablefunction tce_iommu_enablefunction tce_iommu_disablefunction tce_iommu_releasefunction tce_iommu_unuse_pagefunction tce_iommu_prereg_ua_to_hpafunction tce_iommu_unuse_page_v2function tce_iommu_clearfunction tce_iommu_use_pagefunction tce_iommu_buildfunction tce_iommu_build_v2function tce_iommu_create_tablefunction tce_iommu_free_tablefunction tce_iommu_create_windowfunction tce_iommu_remove_windowfunction tce_iommu_create_default_windowfunction vfio_spapr_ioctl_eeh_pe_opfunction tce_iommu_ioctlfunction list_for_each_entryfunction tce_iommu_release_ownershipfunction tce_iommu_take_ownershipfunction tce_iommu_attach_groupfunction tce_iommu_detach_groupfunction list_for_each_entryfunction tce_iommu_initfunction tce_iommu_cleanupmodule init tce_iommu_init
Annotated Snippet
module_init(tce_iommu_init);
module_exit(tce_iommu_cleanup);
MODULE_VERSION(DRIVER_VERSION);
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
Annotation
- Immediate include surface: `linux/module.h`, `linux/pci.h`, `linux/slab.h`, `linux/uaccess.h`, `linux/err.h`, `linux/vfio.h`, `linux/vmalloc.h`, `linux/sched/mm.h`.
- Detected declarations: `struct tce_iommu_group`, `struct tce_iommu_prereg`, `struct tce_container`, `function tce_iommu_mm_set`, `function tce_iommu_prereg_free`, `function tce_iommu_unregister_pages`, `function list_for_each_entry`, `function tce_iommu_register_pages`, `function list_for_each_entry`, `function tce_page_is_contained`.
- Atlas domain: Driver Families / drivers/vfio.
- Implementation status: integration implementation candidate.
- This snippet crosses the user/kernel memory boundary; validate fault handling and access checks before translating the pattern.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.