include/linux/vmw_vmci_defs.h
Source file repositories/reference/linux-study-clean/include/linux/vmw_vmci_defs.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/vmw_vmci_defs.h- Extension
.h- Size
- 30645 bytes
- Lines
- 964
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/atomic.hlinux/bits.h
Detected Declarations
struct vmci_data_in_out_headerstruct vmci_sg_elemstruct vmci_handlestruct vmci_queue_headerstruct vmci_datagramstruct vmci_event_payload_qpstruct vmci_resource_query_hdrstruct vmci_resource_query_msgstruct vmci_notify_bm_set_msgstruct vmci_doorbell_link_msgstruct vmci_doorbell_unlink_msgstruct vmci_doorbell_notify_msgstruct vmci_event_datastruct vmci_event_payld_ctxstruct vmci_event_payld_qpstruct vmci_event_data_maxstruct vmci_event_msgstruct vmci_event_ctxstruct vmci_event_qpstruct vmci_qp_alloc_msgstruct vmci_qp_detach_msgstruct vmci_qpfunction vmci_handle_is_equalfunction vmci_handle_is_invalidfunction vmci_event_data_const_payloadfunction vmci_q_read_pointerfunction vmci_q_set_pointerfunction vmci_qp_add_pointerfunction vmci_q_header_producer_tailfunction vmci_q_header_consumer_headfunction vmci_qp_add_pointerfunction vmci_qp_add_pointerfunction vmci_q_header_get_pointersfunction vmci_q_header_initfunction vmci_q_header_free_spacefunction vmci_q_header_free_space
Annotated Snippet
struct vmci_data_in_out_header {
uint32_t busy;
uint32_t opcode;
uint32_t size;
uint32_t rsvd;
uint64_t result;
};
struct vmci_sg_elem {
uint64_t addr;
uint64_t size;
};
/*
* We have a fixed set of resource IDs available in the VMX.
* This allows us to have a very simple implementation since we statically
* know how many will create datagram handles. If a new caller arrives and
* we have run out of slots we can manually increment the maximum size of
* available resource IDs.
*
* VMCI reserved hypervisor datagram resource IDs.
*/
enum {
VMCI_RESOURCES_QUERY = 0,
VMCI_GET_CONTEXT_ID = 1,
VMCI_SET_NOTIFY_BITMAP = 2,
VMCI_DOORBELL_LINK = 3,
VMCI_DOORBELL_UNLINK = 4,
VMCI_DOORBELL_NOTIFY = 5,
/*
* VMCI_DATAGRAM_REQUEST_MAP and VMCI_DATAGRAM_REMOVE_MAP are
* obsoleted by the removal of VM to VM communication.
*/
VMCI_DATAGRAM_REQUEST_MAP = 6,
VMCI_DATAGRAM_REMOVE_MAP = 7,
VMCI_EVENT_SUBSCRIBE = 8,
VMCI_EVENT_UNSUBSCRIBE = 9,
VMCI_QUEUEPAIR_ALLOC = 10,
VMCI_QUEUEPAIR_DETACH = 11,
/*
* VMCI_VSOCK_VMX_LOOKUP was assigned to 12 for Fusion 3.0/3.1,
* WS 7.0/7.1 and ESX 4.1
*/
VMCI_HGFS_TRANSPORT = 13,
VMCI_UNITY_PBRPC_REGISTER = 14,
VMCI_RPC_PRIVILEGED = 15,
VMCI_RPC_UNPRIVILEGED = 16,
VMCI_RESOURCE_MAX = 17,
};
/*
* struct vmci_handle - Ownership information structure
* @context: The VMX context ID.
* @resource: The resource ID (used for locating in resource hash).
*
* The vmci_handle structure is used to track resources used within
* vmw_vmci.
*/
struct vmci_handle {
u32 context;
u32 resource;
};
#define vmci_make_handle(_cid, _rid) \
(struct vmci_handle){ .context = _cid, .resource = _rid }
static inline bool vmci_handle_is_equal(struct vmci_handle h1,
struct vmci_handle h2)
{
return h1.context == h2.context && h1.resource == h2.resource;
}
#define VMCI_INVALID_ID ~0
static const struct vmci_handle VMCI_INVALID_HANDLE = {
.context = VMCI_INVALID_ID,
.resource = VMCI_INVALID_ID
};
static inline bool vmci_handle_is_invalid(struct vmci_handle h)
{
return vmci_handle_is_equal(h, VMCI_INVALID_HANDLE);
}
/*
* The below defines can be used to send anonymous requests.
* This also indicates that no response is expected.
*/
#define VMCI_ANON_SRC_CONTEXT_ID VMCI_INVALID_ID
#define VMCI_ANON_SRC_RESOURCE_ID VMCI_INVALID_ID
Annotation
- Immediate include surface: `linux/atomic.h`, `linux/bits.h`.
- Detected declarations: `struct vmci_data_in_out_header`, `struct vmci_sg_elem`, `struct vmci_handle`, `struct vmci_queue_header`, `struct vmci_datagram`, `struct vmci_event_payload_qp`, `struct vmci_resource_query_hdr`, `struct vmci_resource_query_msg`, `struct vmci_notify_bm_set_msg`, `struct vmci_doorbell_link_msg`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source 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.