drivers/virt/vboxguest/vmmdev.h
Source file repositories/reference/linux-study-clean/drivers/virt/vboxguest/vmmdev.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/virt/vboxguest/vmmdev.h- Extension
.h- Size
- 14525 bytes
- Lines
- 454
- Domain
- Driver Families
- Bucket
- drivers/virt
- Inferred role
- Driver Families: implementation source
- Status
- source 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 or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
asm/bitsperlong.hlinux/sizes.hlinux/types.hlinux/vbox_vmmdev_types.h
Detected Declarations
struct vmmdev_memorystruct vmmdev_request_headerstruct vmmdev_mouse_statusstruct vmmdev_host_versionstruct vmmdev_maskstruct vmmdev_hypervisorinfostruct vmmdev_eventsstruct vmmdev_guest_infostruct vmmdev_guest_info2struct vmmdev_guest_statusstruct vmmdev_memballoon_infostruct vmmdev_memballoon_changestruct vmmdev_write_core_dumpstruct vmmdev_heartbeatstruct vmmdev_hgcmreq_headerstruct vmmdev_hgcm_connectstruct vmmdev_hgcm_disconnectstruct vmmdev_hgcm_callstruct vmmdev_hgcm_cancel2enum vmmdev_guest_facility_typeenum vmmdev_guest_facility_status
Annotated Snippet
struct vmmdev_memory {
/** The size of this structure. */
u32 size;
/** The structure version. (VMMDEV_MEMORY_VERSION) */
u32 version;
union {
struct {
/** Flag telling that VMMDev has events pending. */
u8 have_events;
/** Explicit padding, MBZ. */
u8 padding[3];
} V1_04;
struct {
/** Pending events flags, set by host. */
u32 host_events;
/** Mask of events the guest wants, set by guest. */
u32 guest_event_mask;
} V1_03;
} V;
/* struct vbva_memory, not used */
};
VMMDEV_ASSERT_SIZE(vmmdev_memory, 8 + 8);
/** Version of vmmdev_memory structure (vmmdev_memory::version). */
#define VMMDEV_MEMORY_VERSION (1)
/* Host mouse capabilities has been changed. */
#define VMMDEV_EVENT_MOUSE_CAPABILITIES_CHANGED BIT(0)
/* HGCM event. */
#define VMMDEV_EVENT_HGCM BIT(1)
/* A display change request has been issued. */
#define VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST BIT(2)
/* Credentials are available for judgement. */
#define VMMDEV_EVENT_JUDGE_CREDENTIALS BIT(3)
/* The guest has been restored. */
#define VMMDEV_EVENT_RESTORED BIT(4)
/* Seamless mode state changed. */
#define VMMDEV_EVENT_SEAMLESS_MODE_CHANGE_REQUEST BIT(5)
/* Memory balloon size changed. */
#define VMMDEV_EVENT_BALLOON_CHANGE_REQUEST BIT(6)
/* Statistics interval changed. */
#define VMMDEV_EVENT_STATISTICS_INTERVAL_CHANGE_REQUEST BIT(7)
/* VRDP status changed. */
#define VMMDEV_EVENT_VRDP BIT(8)
/* New mouse position data available. */
#define VMMDEV_EVENT_MOUSE_POSITION_CHANGED BIT(9)
/* CPU hotplug event occurred. */
#define VMMDEV_EVENT_CPU_HOTPLUG BIT(10)
/* The mask of valid events, for sanity checking. */
#define VMMDEV_EVENT_VALID_EVENT_MASK 0x000007ffU
/*
* Additions are allowed to work only if additions_major == vmmdev_current &&
* additions_minor <= vmmdev_current. Additions version is reported to host
* (VMMDev) by VMMDEVREQ_REPORT_GUEST_INFO.
*/
#define VMMDEV_VERSION 0x00010004
#define VMMDEV_VERSION_MAJOR (VMMDEV_VERSION >> 16)
#define VMMDEV_VERSION_MINOR (VMMDEV_VERSION & 0xffff)
/* Maximum request packet size. */
#define VMMDEV_MAX_VMMDEVREQ_SIZE 1048576
/* Version of vmmdev_request_header structure. */
#define VMMDEV_REQUEST_HEADER_VERSION 0x10001
/** struct vmmdev_request_header - Generic VMMDev request header. */
struct vmmdev_request_header {
/** IN: Size of the structure in bytes (including body). */
u32 size;
/** IN: Version of the structure. */
u32 version;
/** IN: Type of the request. */
enum vmmdev_request_type request_type;
/** OUT: Return code. */
s32 rc;
/** Reserved field no.1. MBZ. */
u32 reserved1;
/** IN: Requestor information (VMMDEV_REQUESTOR_*) */
u32 requestor;
};
VMMDEV_ASSERT_SIZE(vmmdev_request_header, 24);
/**
* struct vmmdev_mouse_status - Mouse status request structure.
*
* Used by VMMDEVREQ_GET_MOUSE_STATUS and VMMDEVREQ_SET_MOUSE_STATUS.
Annotation
- Immediate include surface: `asm/bitsperlong.h`, `linux/sizes.h`, `linux/types.h`, `linux/vbox_vmmdev_types.h`.
- Detected declarations: `struct vmmdev_memory`, `struct vmmdev_request_header`, `struct vmmdev_mouse_status`, `struct vmmdev_host_version`, `struct vmmdev_mask`, `struct vmmdev_hypervisorinfo`, `struct vmmdev_events`, `struct vmmdev_guest_info`, `struct vmmdev_guest_info2`, `struct vmmdev_guest_status`.
- Atlas domain: Driver Families / drivers/virt.
- 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.