opnsense-src/sys/dev/vmware/vmci/vmci_kernel_api_2.h
Mark Peek 63a938566d Add VMCI (Virtual Machine Communication Interface) driver
In a virtual machine, VMCI is exposed as a regular PCI device. The primary
communication mechanisms supported are a point-to-point bidirectional
transport based on a pair of memory-mapped queues, and asynchronous
notifications in the form of datagrams and doorbells. These features are
available to kernel level components such as vSockets through the VMCI
kernel API. In addition to this, the VMCI kernel API provides support for
receiving events related to the state of the VMCI communication channels,
and the virtual machine itself.

Submitted by: Vishnu Dasa <vdasa@vmware.com>
Reviewed by: bcr, imp
Obtained from: VMware
Differential Revision: https://reviews.freebsd.org/D14289
2018-03-25 00:57:00 +00:00

34 lines
896 B
C

/*-
* Copyright (c) 2018 VMware, Inc. All Rights Reserved.
*
* SPDX-License-Identifier: (BSD-2-Clause AND GPL-2.0)
*
* $FreeBSD$
*/
/* Kernel API (v2) exported from the VMCI guest driver. */
#ifndef _VMCI_KERNEL_API_2_H_
#define _VMCI_KERNEL_API_2_H_
#include "vmci_kernel_api_1.h"
/* Define version 2. */
#undef VMCI_KERNEL_API_VERSION
#define VMCI_KERNEL_API_VERSION_2 2
#define VMCI_KERNEL_API_VERSION VMCI_KERNEL_API_VERSION_2
/* VMCI Doorbell API. */
#define VMCI_FLAG_DELAYED_CB 0x01
typedef void (*vmci_callback)(void *client_data);
int vmci_doorbell_create(struct vmci_handle *handle, uint32_t flags,
vmci_privilege_flags priv_flags, vmci_callback notify_cb,
void *client_data);
int vmci_doorbell_destroy(struct vmci_handle handle);
int vmci_doorbell_notify(struct vmci_handle handle,
vmci_privilege_flags priv_flags);
#endif /* !_VMCI_KERNEL_API_2_H_ */