drivers/vdpa/virtio_pci/vp_vdpa.c
Source file repositories/reference/linux-study-clean/drivers/vdpa/virtio_pci/vp_vdpa.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/vdpa/virtio_pci/vp_vdpa.c- Extension
.c- Size
- 17732 bytes
- Lines
- 703
- Domain
- Driver Families
- Bucket
- drivers/vdpa
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- 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/interrupt.hlinux/module.hlinux/pci.hlinux/vdpa.hlinux/virtio.hlinux/virtio_config.hlinux/virtio_ring.hlinux/virtio_pci.hlinux/virtio_pci_modern.huapi/linux/vdpa.h
Detected Declarations
struct vp_vringstruct vp_vdpastruct vp_vdpa_mgmtdevfunction vp_vdpa_get_device_featuresfunction vp_vdpa_set_driver_featuresfunction vp_vdpa_get_driver_featuresfunction vp_vdpa_get_statusfunction vp_vdpa_get_vq_irqfunction vp_vdpa_free_irqfunction vp_vdpa_vq_handlerfunction vp_vdpa_config_handlerfunction vp_vdpa_request_irqfunction vp_vdpa_set_statusfunction vp_vdpa_resetfunction vp_vdpa_get_vq_num_maxfunction vp_vdpa_get_vq_statefunction vp_vdpa_set_vq_state_splitfunction vp_vdpa_set_vq_state_packedfunction vp_vdpa_set_vq_statefunction vp_vdpa_set_vq_cbfunction vp_vdpa_set_vq_readyfunction vp_vdpa_get_vq_readyfunction vp_vdpa_set_vq_numfunction vp_vdpa_get_vq_sizefunction vp_vdpa_set_vq_addressfunction vp_vdpa_kick_vqfunction vp_vdpa_kick_vq_with_datafunction vp_vdpa_get_generationfunction vp_vdpa_get_device_idfunction vp_vdpa_get_vendor_idfunction vp_vdpa_get_vq_alignfunction vp_vdpa_get_config_sizefunction vp_vdpa_get_configfunction vp_vdpa_set_configfunction vp_vdpa_set_config_cbfunction vp_vdpa_get_vq_notificationfunction vp_vdpa_free_irq_vectorsfunction vp_vdpa_dev_addfunction vp_vdpa_dev_delfunction vp_vdpa_probefunction vp_vdpa_remove
Annotated Snippet
static struct pci_driver vp_vdpa_driver = {
.name = "vp-vdpa",
.id_table = NULL, /* only dynamic ids */
.probe = vp_vdpa_probe,
.remove = vp_vdpa_remove,
};
module_pci_driver(vp_vdpa_driver);
MODULE_AUTHOR("Jason Wang <jasowang@redhat.com>");
MODULE_DESCRIPTION("vp-vdpa");
MODULE_LICENSE("GPL");
MODULE_VERSION("1");
Annotation
- Immediate include surface: `linux/interrupt.h`, `linux/module.h`, `linux/pci.h`, `linux/vdpa.h`, `linux/virtio.h`, `linux/virtio_config.h`, `linux/virtio_ring.h`, `linux/virtio_pci.h`.
- Detected declarations: `struct vp_vring`, `struct vp_vdpa`, `struct vp_vdpa_mgmtdev`, `function vp_vdpa_get_device_features`, `function vp_vdpa_set_driver_features`, `function vp_vdpa_get_driver_features`, `function vp_vdpa_get_status`, `function vp_vdpa_get_vq_irq`, `function vp_vdpa_free_irq`, `function vp_vdpa_vq_handler`.
- Atlas domain: Driver Families / drivers/vdpa.
- Implementation status: pattern implementation candidate.
- 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.