Lines Matching +full:reserved +full:- +full:endpoints
1 /* SPDX-License-Identifier: GPL-2.0-only */
5 * Copyright (C) 2012 VMware, Inc. All rights reserved.
60 * Maximum MSI/MSI-X interrupt vectors in the device.
95 * Queues with pre-mapped data pages must be small, so that we don't pin
104 * MSI/MSI-X only requests 8KB. The layout of the larger 256KB region is:
105 * - the first 128KB are used for MSI/MSI-X.
106 * - the following 64KB are used for MMIO register access.
107 * - the remaining 64KB are unused.
118 * - when sending datagrams, the driver initializes the buffer where the
125 * - when receiving datagrams, the driver initializes the buffer where the
154 * VMCI reserved hypervisor datagram resource IDs.
186 * struct vmci_handle - Ownership information structure
229 /* The lowest 16 context ids are reserved for internal use. */
239 * Well-known context id, a logical context that contains a set of
240 * well-known services. This context ID is now obsolete.
245 * Context ID used by host endpoints.
268 VMCI_ERROR_INVALID_RESOURCE = (-1),
269 VMCI_ERROR_INVALID_ARGS = (-2),
270 VMCI_ERROR_NO_MEM = (-3),
271 VMCI_ERROR_DATAGRAM_FAILED = (-4),
272 VMCI_ERROR_MORE_DATA = (-5),
273 VMCI_ERROR_NO_MORE_DATAGRAMS = (-6),
274 VMCI_ERROR_NO_ACCESS = (-7),
275 VMCI_ERROR_NO_HANDLE = (-8),
276 VMCI_ERROR_DUPLICATE_ENTRY = (-9),
277 VMCI_ERROR_DST_UNREACHABLE = (-10),
278 VMCI_ERROR_PAYLOAD_TOO_LARGE = (-11),
279 VMCI_ERROR_INVALID_PRIV = (-12),
280 VMCI_ERROR_GENERIC = (-13),
281 VMCI_ERROR_PAGE_ALREADY_SHARED = (-14),
282 VMCI_ERROR_CANNOT_SHARE_PAGE = (-15),
283 VMCI_ERROR_CANNOT_UNSHARE_PAGE = (-16),
284 VMCI_ERROR_NO_PROCESS = (-17),
285 VMCI_ERROR_NO_DATAGRAM = (-18),
286 VMCI_ERROR_NO_RESOURCES = (-19),
287 VMCI_ERROR_UNAVAILABLE = (-20),
288 VMCI_ERROR_NOT_FOUND = (-21),
289 VMCI_ERROR_ALREADY_EXISTS = (-22),
290 VMCI_ERROR_NOT_PAGE_ALIGNED = (-23),
291 VMCI_ERROR_INVALID_SIZE = (-24),
292 VMCI_ERROR_REGION_ALREADY_SHARED = (-25),
293 VMCI_ERROR_TIMEOUT = (-26),
294 VMCI_ERROR_DATAGRAM_INCOMPLETE = (-27),
295 VMCI_ERROR_INCORRECT_IRQL = (-28),
296 VMCI_ERROR_EVENT_UNKNOWN = (-29),
297 VMCI_ERROR_OBSOLETE = (-30),
298 VMCI_ERROR_QUEUEPAIR_MISMATCH = (-31),
299 VMCI_ERROR_QUEUEPAIR_NOTSET = (-32),
300 VMCI_ERROR_QUEUEPAIR_NOTOWNER = (-33),
301 VMCI_ERROR_QUEUEPAIR_NOTATTACHED = (-34),
302 VMCI_ERROR_QUEUEPAIR_NOSPACE = (-35),
303 VMCI_ERROR_QUEUEPAIR_NODATA = (-36),
304 VMCI_ERROR_BUSMEM_INVALIDATION = (-37),
305 VMCI_ERROR_MODULE_NOT_LOADED = (-38),
306 VMCI_ERROR_DEVICE_NOT_FOUND = (-39),
307 VMCI_ERROR_QUEUEPAIR_NOT_READY = (-40),
308 VMCI_ERROR_WOULD_BLOCK = (-41),
311 VMCI_ERROR_CLIENT_MIN = (-500),
312 VMCI_ERROR_CLIENT_MAX = (-550),
315 VMCI_SHAREDMEM_ERROR_BAD_CONTEXT = (-1000),
318 /* VMCI reserved events. */
320 /* Only applicable to guest endpoints */
326 /* Only applicable to guest endpoints */
350 * Of the above events, a few are reserved for use in the VMX, and
351 * other endpoints (guest and host kernel) should not use them. For
352 * the rest of the events, we allow both host and guest endpoints to
354 * endpoints.
362 /* Reserved guest datagram resource ids. */
366 * VMCI coarse-grained privileges (per context or host
381 /* 0 through VMCI_RESERVED_RESOURCE_ID_MAX are reserved. */
415 * support for host end-points.
434 * The VMCI IOCTLs. We use identity code 7, as noted in ioctl-number.rst,
461 * struct vmci_queue_header - VMCI Queue Header information.
466 * accessibility: Each end-point can modify two things: where the next
470 * An end-point cannot modify the pointers of its peer (guest to
472 * But, each end-point needs read access to both Queue header
474 * in the Queue. This is because for an end-point to know how full
476 * the produce_q but -that- consumer_head is in the Queue header for
477 * that end-points consume_q.
494 * the range [0, size-1].
496 * If produce_q_header->producer_tail == consume_q_header->consumer_head
507 * struct vmci_datagram - Base struct for vmci datagrams.
523 * Second flag is for creating a well-known handle instead of a per context
537 #define VMCI_MAX_DG_PAYLOAD_SIZE (VMCI_MAX_DG_SIZE - \
542 #define VMCI_DG_SIZE(_dg) (VMCI_DG_HEADERSIZE + (size_t)(_dg)->payload_size)
619 * bits of a positive return value. Negative values are reserved for
764 * struct vmci_qp - A vmw_vmci queue pair handle.
817 /* XXX buggered on big-endian */ in vmci_q_set_pointer()
829 if (new_val >= size - add) in vmci_qp_add_pointer()
830 new_val -= size; in vmci_qp_add_pointer()
844 return vmci_q_read_pointer(&qh->producer_tail); in vmci_q_header_producer_tail()
854 return vmci_q_read_pointer(&qh->consumer_head); in vmci_q_header_consumer_head()
866 vmci_qp_add_pointer(&q_header->producer_tail, add, queue_size); in vmci_q_header_add_producer_tail()
878 vmci_qp_add_pointer(&q_header->consumer_head, add, queue_size); in vmci_q_header_add_consumer_head()
901 q_header->handle = handle; in vmci_q_header_init()
902 q_header->producer_tail = 0; in vmci_q_header_init()
903 q_header->consumer_head = 0; in vmci_q_header_init()
931 free_space = produce_q_size - (tail - head) - 1; in vmci_q_header_free_space()
933 free_space = head - tail - 1; in vmci_q_header_free_space()
959 return consume_q_size - free_space - 1; in vmci_q_header_buf_ready()