arch/um/drivers/vhost_user.h
Source file repositories/reference/linux-study-clean/arch/um/drivers/vhost_user.h
File Facts
- System
- Linux kernel
- Corpus path
arch/um/drivers/vhost_user.h- Extension
.h- Size
- 3218 bytes
- Lines
- 124
- Domain
- Architecture Layer
- Bucket
- arch/um
- Inferred role
- Architecture Layer: implementation source
- Status
- source 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct vhost_user_headerstruct vhost_user_configstruct vhost_user_vring_statestruct vhost_user_vring_addrstruct vhost_user_mem_regionstruct vhost_user_mem_regionsstruct vhost_user_msgenum vhost_user_requestenum vhost_user_slave_request
Annotated Snippet
struct vhost_user_header {
/*
* Use enum vhost_user_request for outgoing messages,
* uses enum vhost_user_slave_request for incoming ones.
*/
u32 request;
u32 flags;
u32 size;
} __packed;
struct vhost_user_config {
u32 offset;
u32 size;
u32 flags;
u8 payload[]; /* Variable length */
} __packed;
struct vhost_user_vring_state {
u32 index;
u32 num;
} __packed;
struct vhost_user_vring_addr {
u32 index;
u32 flags;
u64 desc, used, avail, log;
} __packed;
struct vhost_user_mem_region {
u64 guest_addr;
u64 size;
u64 user_addr;
u64 mmap_offset;
} __packed;
struct vhost_user_mem_regions {
u32 num;
u32 padding;
struct vhost_user_mem_region regions[2]; /* Currently supporting 2 */
} __packed;
union vhost_user_payload {
u64 integer;
struct vhost_user_config config;
struct vhost_user_vring_state vring_state;
struct vhost_user_vring_addr vring_addr;
struct vhost_user_mem_regions mem_regions;
};
struct vhost_user_msg {
struct vhost_user_header header;
union vhost_user_payload payload;
} __packed;
#endif
Annotation
- Detected declarations: `struct vhost_user_header`, `struct vhost_user_config`, `struct vhost_user_vring_state`, `struct vhost_user_vring_addr`, `struct vhost_user_mem_region`, `struct vhost_user_mem_regions`, `struct vhost_user_msg`, `enum vhost_user_request`, `enum vhost_user_slave_request`.
- Atlas domain: Architecture Layer / arch/um.
- Implementation status: source implementation candidate.
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.