drivers/vdpa/vdpa_sim/vdpa_sim_blk.c
Source file repositories/reference/linux-study-clean/drivers/vdpa/vdpa_sim/vdpa_sim_blk.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/vdpa/vdpa_sim/vdpa_sim_blk.c- Extension
.c- Size
- 13285 bytes
- Lines
- 520
- Domain
- Driver Families
- Bucket
- drivers/vdpa
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/init.hlinux/module.hlinux/device.hlinux/kernel.hlinux/blkdev.hlinux/vringh.hlinux/vdpa.huapi/linux/virtio_blk.hvdpa_sim.h
Detected Declarations
struct vdpasim_blkfunction vdpasim_blk_buffer_lockfunction vdpasim_blk_buffer_unlockfunction vdpasim_blk_check_rangefunction vdpasim_blk_handle_reqfunction vdpasim_blk_workfunction vdpasim_blk_get_configfunction vdpasim_blk_freefunction vdpasim_blk_dev_addfunction vdpasim_blk_dev_delfunction vdpasim_blk_initfunction vdpasim_blk_exitmodule init vdpasim_blk_init
Annotated Snippet
module_init(vdpasim_blk_init)
module_exit(vdpasim_blk_exit)
MODULE_VERSION(DRV_VERSION);
MODULE_LICENSE(DRV_LICENSE);
MODULE_AUTHOR(DRV_AUTHOR);
MODULE_DESCRIPTION(DRV_DESC);
Annotation
- Immediate include surface: `linux/init.h`, `linux/module.h`, `linux/device.h`, `linux/kernel.h`, `linux/blkdev.h`, `linux/vringh.h`, `linux/vdpa.h`, `uapi/linux/virtio_blk.h`.
- Detected declarations: `struct vdpasim_blk`, `function vdpasim_blk_buffer_lock`, `function vdpasim_blk_buffer_unlock`, `function vdpasim_blk_check_range`, `function vdpasim_blk_handle_req`, `function vdpasim_blk_work`, `function vdpasim_blk_get_config`, `function vdpasim_blk_free`, `function vdpasim_blk_dev_add`, `function vdpasim_blk_dev_del`.
- Atlas domain: Driver Families / drivers/vdpa.
- Implementation status: integration implementation candidate.
- 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.