Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
[linux/fpc-iii.git] / drivers / misc / vmw_vmci / vmci_driver.h
blobcee9e977d318429bd84ab6703ab192ed19146488
1 /*
2 * VMware VMCI Driver
4 * Copyright (C) 2012 VMware, Inc. All rights reserved.
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation version 2 and no later version.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * for more details.
16 #ifndef _VMCI_DRIVER_H_
17 #define _VMCI_DRIVER_H_
19 #include <linux/vmw_vmci_defs.h>
20 #include <linux/wait.h>
22 #include "vmci_queue_pair.h"
23 #include "vmci_context.h"
25 enum vmci_obj_type {
26 VMCIOBJ_VMX_VM = 10,
27 VMCIOBJ_CONTEXT,
28 VMCIOBJ_SOCKET,
29 VMCIOBJ_NOT_SET,
32 /* For storing VMCI structures in file handles. */
33 struct vmci_obj {
34 void *ptr;
35 enum vmci_obj_type type;
39 * Needed by other components of this module. It's okay to have one global
40 * instance of this because there can only ever be one VMCI device. Our
41 * virtual hardware enforces this.
43 extern struct pci_dev *vmci_pdev;
45 u32 vmci_get_context_id(void);
46 int vmci_send_datagram(struct vmci_datagram *dg);
48 int vmci_host_init(void);
49 void vmci_host_exit(void);
50 bool vmci_host_code_active(void);
52 int vmci_guest_init(void);
53 void vmci_guest_exit(void);
54 bool vmci_guest_code_active(void);
55 u32 vmci_get_vm_context_id(void);
57 #endif /* _VMCI_DRIVER_H_ */