drivers/gpu/drm/i915/gvt/kvmgt.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/gvt/kvmgt.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/gvt/kvmgt.c- Extension
.c- Size
- 48559 bytes
- Lines
- 1971
- Domain
- Driver Families
- Bucket
- drivers/gpu
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- 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/debugfs.hlinux/eventfd.hlinux/init.hlinux/kthread.hlinux/list.hlinux/mdev.hlinux/mm.hlinux/nospec.hlinux/rbtree.hlinux/sched/mm.hlinux/spinlock.hlinux/types.hdrm/drm_edid.hdrm/drm_print.hgvt.hi915_drv.hintel_gvt.hsched_policy.h
Detected Declarations
struct vfio_regionstruct intel_vgpu_regopsstruct vfio_regionstruct vfio_edid_regionstruct kvmgt_pgfnstruct gvt_dmafunction intel_vgpu_show_descriptionfunction gvt_unpin_guest_pagefunction gvt_pin_guest_pagefunction gvt_dma_map_pagefunction gvt_dma_unmap_pagefunction __gvt_cache_addfunction __gvt_cache_remove_entryfunction gvt_cache_destroyfunction gvt_cache_initfunction kvmgt_protect_table_initfunction kvmgt_protect_table_destroyfunction hash_for_each_safefunction __kvmgt_protect_table_findfunction hash_for_each_possiblefunction kvmgt_gfn_is_write_protectedfunction kvmgt_protect_table_addfunction kvmgt_protect_table_delfunction intel_vgpu_reg_rw_opregionfunction intel_vgpu_reg_release_opregionfunction edid_validfunction handle_edid_regsfunction offsetoffunction handle_edid_blobfunction intel_vgpu_reg_rw_edidfunction intel_vgpu_reg_release_edidfunction intel_vgpu_register_regfunction intel_gvt_set_opregionfunction intel_gvt_set_edidfunction intel_vgpu_dma_unmapfunction __kvmgt_vgpu_existfunction intel_vgpu_open_devicefunction intel_vgpu_release_msi_eventfd_ctxfunction intel_vgpu_close_devicefunction intel_vgpu_get_bar_addrfunction intel_vgpu_bar_rwfunction intel_vgpu_in_aperturefunction intel_vgpu_aperture_rwfunction intel_vgpu_rwfunction gtt_entryfunction intel_vgpu_readfunction intel_vgpu_writefunction intel_vgpu_mmap
Annotated Snippet
module_init(kvmgt_init);
module_exit(kvmgt_exit);
MODULE_DESCRIPTION("Intel mediated pass-through framework for KVM");
MODULE_LICENSE("GPL and additional rights");
MODULE_AUTHOR("Intel Corporation");
Annotation
- Immediate include surface: `linux/debugfs.h`, `linux/eventfd.h`, `linux/init.h`, `linux/kthread.h`, `linux/list.h`, `linux/mdev.h`, `linux/mm.h`, `linux/nospec.h`.
- Detected declarations: `struct vfio_region`, `struct intel_vgpu_regops`, `struct vfio_region`, `struct vfio_edid_region`, `struct kvmgt_pgfn`, `struct gvt_dma`, `function intel_vgpu_show_description`, `function gvt_unpin_guest_page`, `function gvt_pin_guest_page`, `function gvt_dma_map_page`.
- Atlas domain: Driver Families / drivers/gpu.
- 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.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.