arch/um/drivers/virtio_uml.c
Source file repositories/reference/linux-study-clean/arch/um/drivers/virtio_uml.c
File Facts
- System
- Linux kernel
- Corpus path
arch/um/drivers/virtio_uml.c- Extension
.c- Size
- 38071 bytes
- Lines
- 1545
- Domain
- Architecture Layer
- Bucket
- arch/um
- Inferred role
- Architecture Layer: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- 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.
- 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/module.hlinux/of.hlinux/platform_device.hlinux/slab.hlinux/string_choices.hlinux/virtio.hlinux/virtio_config.hlinux/virtio_ring.hlinux/time-internal.hlinux/virtio-uml.hshared/as-layout.hirq_kern.hinit.hos.hmconsole_kern.hvhost_user.h
Detected Declarations
struct virtio_uml_platform_datastruct virtio_uml_devicestruct virtio_uml_vq_infofunction full_sendmsg_fdsfunction full_readfunction vhost_user_recv_headerfunction vhost_user_recvfunction vhost_user_check_resetfunction vhost_user_recv_respfunction vhost_user_recv_u64function vhost_user_recv_reqfunction vhost_user_sendfunction vhost_user_send_no_payloadfunction vhost_user_send_no_payload_fdfunction vhost_user_send_u64function vhost_user_set_ownerfunction vhost_user_get_featuresfunction vhost_user_set_featuresfunction vhost_user_get_protocol_featuresfunction vhost_user_set_protocol_featuresfunction vhost_user_get_queue_numfunction vhost_user_replyfunction vu_req_read_messagefunction virtio_device_for_each_vqfunction vu_req_interruptfunction virtio_device_for_each_vqfunction vu_req_interrupt_comm_handlerfunction vhost_user_init_slave_reqfunction vhost_user_initfunction vhost_user_get_configfunction vhost_user_set_configfunction vhost_user_init_mem_regionfunction vhost_user_set_mem_tablefunction vhost_user_set_vring_statefunction vhost_user_set_vring_numfunction vhost_user_set_vring_basefunction vhost_user_set_vring_addrfunction vhost_user_set_vring_fdfunction vhost_user_set_vring_callfunction vhost_user_set_vring_kickfunction vhost_user_set_vring_enablefunction vu_notifyfunction vu_interruptfunction vu_getfunction vu_setfunction vu_get_statusfunction vu_set_statusfunction vu_reset
Annotated Snippet
module_init(virtio_uml_init);
module_exit(virtio_uml_exit);
__uml_exitcall(virtio_uml_exit);
MODULE_DESCRIPTION("UML driver for vhost-user virtio devices");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/module.h`, `linux/of.h`, `linux/platform_device.h`, `linux/slab.h`, `linux/string_choices.h`, `linux/virtio.h`, `linux/virtio_config.h`, `linux/virtio_ring.h`.
- Detected declarations: `struct virtio_uml_platform_data`, `struct virtio_uml_device`, `struct virtio_uml_vq_info`, `function full_sendmsg_fds`, `function full_read`, `function vhost_user_recv_header`, `function vhost_user_recv`, `function vhost_user_check_reset`, `function vhost_user_recv_resp`, `function vhost_user_recv_u64`.
- Atlas domain: Architecture Layer / arch/um.
- Implementation status: integration implementation candidate.
- 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.