xref: /freebsd/sys/dev/vmware/vmci/vmci_kernel_api_2.h (revision bdd1243df58e60e85101c09001d9812a789b6bc4)
1 /*-
2  * Copyright (c) 2018 VMware, Inc.
3  *
4  * SPDX-License-Identifier: (BSD-2-Clause OR GPL-2.0)
5  *
6  * $FreeBSD$
7  */
8 
9 /* Kernel API (v2) exported from the VMCI guest driver. */
10 
11 #ifndef _VMCI_KERNEL_API_2_H_
12 #define _VMCI_KERNEL_API_2_H_
13 
14 #include "vmci_kernel_api_1.h"
15 
16 /* Define version 2. */
17 
18 #undef  VMCI_KERNEL_API_VERSION
19 #define VMCI_KERNEL_API_VERSION_2	2
20 #define VMCI_KERNEL_API_VERSION		VMCI_KERNEL_API_VERSION_2
21 
22 /* VMCI Doorbell API. */
23 #define VMCI_FLAG_DELAYED_CB		0x01
24 
25 typedef void (*vmci_callback)(void *client_data);
26 
27 int	vmci_doorbell_create(struct vmci_handle *handle, uint32_t flags,
28 	    vmci_privilege_flags priv_flags, vmci_callback notify_cb,
29 	    void *client_data);
30 int	vmci_doorbell_destroy(struct vmci_handle handle);
31 int	vmci_doorbell_notify(struct vmci_handle handle,
32 	    vmci_privilege_flags priv_flags);
33 
34 #endif /* !_VMCI_KERNEL_API_2_H_ */
35