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