kernel: vm kernel call can't suspend
[minix.git] / drivers / vbox / vmmdev.h
blob0047baea454166e21d789769a2686df16c56678b
1 #ifndef _VBOX_VMMDEV_H
2 #define _VBOX_VMMDEV_H
4 #define VMMDEV_PCI_VID 0x80ee
5 #define VMMDEV_PCI_DID 0xcafe
7 #define VMMDEV_REQ_HOSTTIME 10
8 #define VMMDEV_REQ_ACKNOWLEDGEEVENTS 41
9 #define VMMDEV_REQ_REPORTGUESTINFO 50
10 #define VMMDEV_REQ_HGCMCONNECT 60
11 #define VMMDEV_REQ_HGCMDISCONNECT 61
12 #define VMMDEV_REQ_HGCMCALL 62
13 #define VMMDEV_REQ_HGCMCANCEL 64
15 #define VMMDEV_ERR_OK 0 /* success */
16 #define VMMDEV_ERR_GENERIC (-1) /* general failure */
17 #define VMMDEV_ERR_HGCM_NOT_FOUND (-2900) /* service not found */
18 #define VMMDEV_ERR_HGCM_DENIED 2901 /* client rejected */
19 #define VMMDEV_ERR_HGCM_INVALID_ADDR (-2902) /* invalid address */
20 #define VMMDEV_ERR_HGCM_ASYNC_EXEC 2903 /* call in progress */
21 #define VMMDEV_ERR_HGCM_INTERNAL (-2904) /* internal error */
22 #define VMMDEV_ERR_HGCM_INVALID_ID (-2905) /* invalid client ID */
24 #define VMMDEV_MAKEWORD(m,n) (((m) << 16) | (n))
26 #define VMMDEV_BACKDOOR_VERSION VMMDEV_MAKEWORD(1, 1)
27 #define VMMDEV_GUEST_VERSION VMMDEV_MAKEWORD(1, 4)
28 #define VMMDEV_GUEST_OS_OTHER 0x90000 /* this is L4 - close enough */
30 struct VMMDevRequestHeader {
31 u32_t size;
32 u32_t version;
33 u32_t type;
34 i32_t result;
35 u32_t reserved[2];
38 struct VMMDevReportGuestInfo {
39 struct VMMDevRequestHeader header;
40 u32_t add_version;
41 u32_t os_type;
44 struct VMMDevReqHostTime {
45 struct VMMDevRequestHeader header;
46 u64_t time;
49 #define VMMDEV_EVENT_HGCM (1 << 1)
51 struct VMMDevEvents {
52 struct VMMDevRequestHeader header;
53 u32_t events;
56 #define VMMDEV_HGCM_REQ_DONE (1 << 0)
58 struct VMMDevHGCMHeader {
59 struct VMMDevRequestHeader header;
60 u32_t flags;
61 i32_t result;
64 #define VMMDEV_HGCM_SVCLOC_LOCALHOST_EXISTING 2
66 #define VMMDEV_HGCM_NAME_SIZE 128
68 struct VMMDevHGCMConnect {
69 struct VMMDevHGCMHeader header;
70 u32_t type;
71 char name[VMMDEV_HGCM_NAME_SIZE];
72 u32_t client_id;
75 struct VMMDevHGCMDisconnect {
76 struct VMMDevHGCMHeader header;
77 u32_t client_id;
80 #define VMMDEV_HGCM_FLAG_TO_HOST 0x01
81 #define VMMDEV_HGCM_FLAG_FROM_HOST 0x02
83 struct VMMDevHGCMPageList {
84 u32_t flags;
85 u16_t offset;
86 u16_t count;
87 u64_t addr[1];
90 #define VMMDEV_HGCM_PARAM_U32 1
91 #define VMMDEV_HGCM_PARAM_U64 2
92 #define VMMDEV_HGCM_PARAM_PAGELIST 10
94 struct VMMDevHGCMParam {
95 u32_t type;
96 union {
97 u32_t u32;
98 u64_t u64;
99 struct {
100 u32_t size;
101 union {
102 u32_t phys;
103 void *vir;
104 } addr;
105 } ptr;
106 struct {
107 u32_t size;
108 u32_t offset;
109 } pagelist;
113 struct VMMDevHGCMCall {
114 struct VMMDevHGCMHeader header;
115 u32_t client_id;
116 u32_t function;
117 u32_t count;
120 struct VMMDevHGCMCancel {
121 struct VMMDevHGCMHeader header;
124 #define VMMDEV_BUF_SIZE 4096 /* just one page */
126 #endif /* _VBOX_VMMDEV_H */