1
/*********************************************************
2
* Copyright (C) 1998 VMware, Inc. All rights reserved.
4
* The contents of this file are subject to the terms of the Common
5
* Development and Distribution License (the "License") version 1.0
6
* and no later version. You may not use this file except in
7
* compliance with the License.
9
* You can obtain a copy of the License at
10
* http://www.opensource.org/licenses/cddl1.php
12
* See the License for the specific language governing permissions
13
* and limitations under the License.
15
*********************************************************/
20
* Second layer of the internal communication channel between guest
21
* applications and vmware
25
#ifndef _GUEST_MSG_DEF_H_
26
#define _GUEST_MSG_DEF_H_
28
#define INCLUDE_ALLOW_MODULE
29
#define INCLUDE_ALLOW_USERLEVEL
30
#define INCLUDE_ALLOW_VMMEXT
31
#include "includeCheck.h"
34
/* Basic request types */
37
MESSAGE_TYPE_SENDSIZE,
38
MESSAGE_TYPE_SENDPAYLOAD,
39
MESSAGE_TYPE_RECVSIZE,
40
MESSAGE_TYPE_RECVPAYLOAD,
41
MESSAGE_TYPE_RECVSTATUS,
47
/* The basic request succeeded */
48
#define MESSAGE_STATUS_SUCCESS 0x0001
49
/* vmware has a message available for its party */
50
#define MESSAGE_STATUS_DORECV 0x0002
51
/* The channel has been closed */
52
#define MESSAGE_STATUS_CLOSED 0x0004
53
/* vmware removed the message before the party fetched it */
54
#define MESSAGE_STATUS_UNSENT 0x0008
55
/* A checkpoint occurred */
56
#define MESSAGE_STATUS_CPT 0x0010
57
/* An underlying device is powering off */
58
#define MESSAGE_STATUS_POWEROFF 0x0020
59
/* vmware has detected a timeout on the channel */
60
#define MESSAGE_STATUS_TIMEOUT 0x0040
61
/* vmware supports high-bandwidth for sending and receiving the payload */
62
#define MESSAGE_STATUS_HB 0x0080
65
* This mask defines the status bits that the guest is allowed to set;
66
* we use this to mask out all other bits when receiving the status
67
* from the guest. Otherwise, the guest can manipulate VMX state by
68
* setting status bits that are only supposed to be changed by the
71
#define MESSAGE_STATUS_GUEST_MASK MESSAGE_STATUS_SUCCESS
74
* Max number of channels.
75
* Unfortunately this has to be public because the monitor part
76
* of the backdoor needs it for its trivial-case optimization. [greg]
78
#define GUESTMSG_MAX_CHANNEL 8
80
/* Flags to open a channel. --hpreg */
81
#define GUESTMSG_FLAG_COOKIE 0x80000000
82
#define GUESTMSG_FLAG_ALL GUESTMSG_FLAG_COOKIE
85
* Maximum size of incoming message. This is to prevent denial of host service
86
* attacks from guest applications.
88
#define GUESTMSG_MAX_IN_SIZE (64 * 1024)
90
#endif /* _GUEST_MSG_DEF_H_ */