~ubuntu-branches/ubuntu/quantal/open-vm-tools/quantal-201210021442

« back to all changes in this revision

Viewing changes to lib/include/backdoor_def.h

  • Committer: Bazaar Package Importer
  • Author(s): Serge Hallyn
  • Date: 2011-03-31 14:20:05 UTC
  • mfrom: (1.4.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110331142005-3n9red91p7ogkweo
Tags: 2011.03.28-387002-0ubuntu1
* Merge latest upstream git tag.  This has the unlocked_ioctl change
  needed to fix dkms build failures (LP: #727342)
* Changes in debian/rules:
  - work around a bug in toolbox/Makefile, where install-exec-hook is
    not happening.  This needs to get fixed the right way.
  - don't install 'vmware-user' which seems to no longer exist
  - move /etc/xdg into open-vm-toolbox (which should be done using .install)
* debian/open-vm-tools.init: add 'modprobe [-r] vmblock'. (LP: #332323)
* debian/rules and debian/open-vm-toolbox.lintian-overrides:
  - Make vmware-user-suid-wrapper suid-root (LP: #332323)

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
 
61
61
#define BDOOR_PORT 0x5658
62
62
 
63
 
#define BDOOR_CMD_GETMHZ                   1
 
63
#define   BDOOR_CMD_GETMHZ                          1
64
64
/*
65
65
 * BDOOR_CMD_APMFUNCTION is used by:
66
66
 *
73
73
 *
74
74
 *  --hpreg
75
75
 */
76
 
#define BDOOR_CMD_APMFUNCTION              2
77
 
#define BDOOR_CMD_GETDISKGEO               3
78
 
#define BDOOR_CMD_GETPTRLOCATION              4
79
 
#define BDOOR_CMD_SETPTRLOCATION              5
80
 
#define BDOOR_CMD_GETSELLENGTH             6
81
 
#define BDOOR_CMD_GETNEXTPIECE             7
82
 
#define BDOOR_CMD_SETSELLENGTH             8
83
 
#define BDOOR_CMD_SETNEXTPIECE             9
84
 
#define BDOOR_CMD_GETVERSION                  10
85
 
#define BDOOR_CMD_GETDEVICELISTELEMENT  11
86
 
#define BDOOR_CMD_TOGGLEDEVICE             12
87
 
#define BDOOR_CMD_GETGUIOPTIONS            13
88
 
#define BDOOR_CMD_SETGUIOPTIONS            14
89
 
#define BDOOR_CMD_GETSCREENSIZE            15
90
 
#define BDOOR_CMD_MONITOR_CONTROL       16
91
 
#define BDOOR_CMD_GETHWVERSION          17
92
 
#define BDOOR_CMD_OSNOTFOUND            18
93
 
#define BDOOR_CMD_GETUUID               19
94
 
#define BDOOR_CMD_GETMEMSIZE            20
95
 
#define BDOOR_CMD_HOSTCOPY              21 /* Devel only */
96
 
#define BDOOR_CMD_SERVICE_VM            22 /* Unused, never shipped, prototype only */         
97
 
#define BDOOR_CMD_GETTIME               23 /* Deprecated. Use GETTIMEFULL. */
98
 
#define BDOOR_CMD_STOPCATCHUP           24
99
 
#define BDOOR_CMD_PUTCHR                25 /* Devel only */
100
 
#define BDOOR_CMD_ENABLE_MSG            26 /* Devel only */
101
 
#define BDOOR_CMD_GOTO_TCL              27 /* Devel only */
102
 
#define BDOOR_CMD_INITPCIOPROM          28
103
 
#define BDOOR_CMD_INT13                 29
104
 
#define BDOOR_CMD_MESSAGE               30
105
 
#define BDOOR_CMD_RSVD0                 31
106
 
#define BDOOR_CMD_RSVD1                 32
107
 
#define BDOOR_CMD_RSVD2                 33
108
 
#define BDOOR_CMD_ISACPIDISABLED        34
109
 
#define BDOOR_CMD_TOE                   35 /* Not in use */
110
 
#define BDOOR_CMD_ISMOUSEABSOLUTE       36
111
 
#define BDOOR_CMD_PATCH_SMBIOS_STRUCTS  37
112
 
#define BDOOR_CMD_MAPMEM                38 /* Devel only */
113
 
#define BDOOR_CMD_ABSPOINTER_DATA       39
114
 
#define BDOOR_CMD_ABSPOINTER_STATUS     40
115
 
#define BDOOR_CMD_ABSPOINTER_COMMAND    41
116
 
#define BDOOR_CMD_TIMER_SPONGE          42 /* Not supported anymore */
117
 
#define BDOOR_CMD_PATCH_ACPI_TABLES     43
118
 
/* Catch-all to allow synchronous tests */
119
 
#define BDOOR_CMD_DEVEL_FAKEHARDWARE    44 /* Debug only - needed in beta */
120
 
#define BDOOR_CMD_GETHZ                 45
121
 
#define BDOOR_CMD_GETTIMEFULL           46
122
 
#define BDOOR_CMD_STATELOGGER           47
123
 
#define BDOOR_CMD_CHECKFORCEBIOSSETUP   48
124
 
#define BDOOR_CMD_LAZYTIMEREMULATION    49
125
 
#define BDOOR_CMD_BIOSBBS               50
126
 
#define BDOOR_CMD_VASSERT               51
127
 
#define BDOOR_CMD_ISGOSDARWIN           52
128
 
#define BDOOR_CMD_DEBUGEVENT            53
129
 
#define BDOOR_CMD_OSNOTMACOSXSERVER     54
130
 
#define BDOOR_CMD_GETTIMEFULL_WITH_LAG  55
131
 
#define BDOOR_CMD_ACPI_HOTPLUG_DEVICE   56
132
 
#define BDOOR_CMD_ACPI_HOTPLUG_MEMORY   57
133
 
#define BDOOR_CMD_ACPI_HOTPLUG_CBRET    58
134
 
#define BDOOR_CMD_GET_HOST_VIDEO_MODES  59 /* Not in use */
135
 
#define BDOOR_CMD_ACPI_HOTPLUG_CPU      60
136
 
#define BDOOR_CMD_USB_HOTPLUG_MOUSE     61 /* Not in use */
137
 
#define BDOOR_CMD_XPMODE                62
138
 
#define BDOOR_CMD_NESTING_CONTROL       63
139
 
#define BDOOR_CMD_FIRMWARE_INIT         64
140
 
#define BDOOR_CMD_FIRMWARE_ACPI_SERVICES 65
141
 
#  define BDOOR_CMD_FAS_GET_TABLE_SIZE    0
142
 
#  define BDOOR_CMD_FAS_GET_TABLE_DATA    1
143
 
#  define BDOOR_CMD_FAS_GET_PLATFORM_NAME 2
144
 
#define BDOOR_CMD_SENDPSHAREHINTS       66
145
 
#define BDOOR_CMD_MAX                   67
 
76
#define   BDOOR_CMD_APMFUNCTION               2 /* CPL0 only. */
 
77
#define   BDOOR_CMD_GETDISKGEO                3
 
78
#define   BDOOR_CMD_GETPTRLOCATION            4
 
79
#define   BDOOR_CMD_SETPTRLOCATION            5
 
80
#define   BDOOR_CMD_GETSELLENGTH              6
 
81
#define   BDOOR_CMD_GETNEXTPIECE              7
 
82
#define   BDOOR_CMD_SETSELLENGTH              8
 
83
#define   BDOOR_CMD_SETNEXTPIECE              9
 
84
#define   BDOOR_CMD_GETVERSION               10
 
85
#define   BDOOR_CMD_GETDEVICELISTELEMENT     11
 
86
#define   BDOOR_CMD_TOGGLEDEVICE             12
 
87
#define   BDOOR_CMD_GETGUIOPTIONS            13
 
88
#define   BDOOR_CMD_SETGUIOPTIONS            14
 
89
#define   BDOOR_CMD_GETSCREENSIZE            15
 
90
#define   BDOOR_CMD_MONITOR_CONTROL          16 /* Disabled by default. */
 
91
#define   BDOOR_CMD_GETHWVERSION             17
 
92
#define   BDOOR_CMD_OSNOTFOUND               18 /* CPL0 only. */
 
93
#define   BDOOR_CMD_GETUUID                  19
 
94
#define   BDOOR_CMD_GETMEMSIZE               20
 
95
#define   BDOOR_CMD_HOSTCOPY                 21 /* Devel only. */
 
96
//#define BDOOR_CMD_SERVICE_VM               22 /* Not in use. Never shipped. */
 
97
#define   BDOOR_CMD_GETTIME                  23 /* Deprecated -> GETTIMEFULL. */
 
98
#define   BDOOR_CMD_STOPCATCHUP              24
 
99
#define   BDOOR_CMD_PUTCHR                   25 /* Disabled by default. */
 
100
#define   BDOOR_CMD_ENABLE_MSG               26 /* Devel only. */
 
101
#define   BDOOR_CMD_GOTO_TCL                 27 /* Devel only. */
 
102
#define   BDOOR_CMD_INITPCIOPROM             28 /* CPL 0 only. */
 
103
//#define BDOOR_CMD_INT13                    29 /* Not in use. */
 
104
#define   BDOOR_CMD_MESSAGE                  30
 
105
#define   BDOOR_CMD_SIDT                     31
 
106
#define   BDOOR_CMD_SGDT                     32
 
107
#define   BDOOR_CMD_SLDT_STR                 33
 
108
#define   BDOOR_CMD_ISACPIDISABLED           34
 
109
//#define BDOOR_CMD_TOE                      35 /* Not in use. */
 
110
#define   BDOOR_CMD_ISMOUSEABSOLUTE          36
 
111
#define   BDOOR_CMD_PATCH_SMBIOS_STRUCTS     37 /* CPL 0 only. */
 
112
#define   BDOOR_CMD_MAPMEM                   38 /* Devel only */
 
113
#define   BDOOR_CMD_ABSPOINTER_DATA          39
 
114
#define   BDOOR_CMD_ABSPOINTER_STATUS        40
 
115
#define   BDOOR_CMD_ABSPOINTER_COMMAND       41
 
116
//#define BDOOR_CMD_TIMER_SPONGE             42 /* Not in use. */
 
117
#define   BDOOR_CMD_PATCH_ACPI_TABLES        43 /* CPL 0 only. */
 
118
//#define BDOOR_CMD_DEVEL_FAKEHARDWARE       44 /* Not in use. */
 
119
#define   BDOOR_CMD_GETHZ                    45
 
120
#define   BDOOR_CMD_GETTIMEFULL              46
 
121
#define   BDOOR_CMD_STATELOGGER              47 /* Disabled by default. */
 
122
#define   BDOOR_CMD_CHECKFORCEBIOSSETUP      48 /* CPL 0 only. */
 
123
#define   BDOOR_CMD_LAZYTIMEREMULATION       49 /* CPL 0 only. */
 
124
#define   BDOOR_CMD_BIOSBBS                  50 /* CPL 0 only. */
 
125
//#define BDOOR_CMD_VASSERT                  51 /* Not in use. */
 
126
#define   BDOOR_CMD_ISGOSDARWIN              52
 
127
#define   BDOOR_CMD_DEBUGEVENT               53
 
128
#define   BDOOR_CMD_OSNOTMACOSXSERVER        54 /* CPL 0 only. */
 
129
#define   BDOOR_CMD_GETTIMEFULL_WITH_LAG     55
 
130
#define   BDOOR_CMD_ACPI_HOTPLUG_DEVICE      56 /* Devel only. */
 
131
#define   BDOOR_CMD_ACPI_HOTPLUG_MEMORY      57 /* Devel only. */
 
132
#define   BDOOR_CMD_ACPI_HOTPLUG_CBRET       58 /* Devel only. */
 
133
//#define BDOOR_CMD_GET_HOST_VIDEO_MODES     59 /* Not in use. */
 
134
#define   BDOOR_CMD_ACPI_HOTPLUG_CPU         60 /* Devel only. */
 
135
//#define BDOOR_CMD_USB_HOTPLUG_MOUSE        61 /* Not in use. Never shipped. */
 
136
#define   BDOOR_CMD_XPMODE                   62 /* CPL 0 only. */
 
137
#define   BDOOR_CMD_NESTING_CONTROL          63
 
138
#define   BDOOR_CMD_FIRMWARE_INIT            64 /* CPL 0 only. */
 
139
#define   BDOOR_CMD_FIRMWARE_ACPI_SERVICES   65 /* CPL 0 only. */
 
140
#  define BDOOR_CMD_FAS_GET_TABLE_SIZE        0
 
141
#  define BDOOR_CMD_FAS_GET_TABLE_DATA        1
 
142
#  define BDOOR_CMD_FAS_GET_PLATFORM_NAME     2
 
143
#  define BDOOR_CMD_FAS_GET_PCIE_OSC_MASK     3
 
144
#define   BDOOR_CMD_SENDPSHAREHINTS          66
 
145
#define   BDOOR_CMD_ENABLE_USB_MOUSE         67
 
146
#define   BDOOR_CMD_GET_VCPU_INFO            68
 
147
#  define BDOOR_CMD_VCPU_SLC64                0
 
148
#  define BDOOR_CMD_VCPU_SYNC_VTSCS           1
 
149
#  define BDOOR_CMD_VCPU_HV_REPLAY_OK         2
 
150
#  define BDOOR_CMD_VCPU_RESERVED            31
 
151
#define   BDOOR_CMD_EFI_SERIALCON_CONFIG     69 /* CPL 0 only. */
 
152
#define   BDOOR_CMD_BUG328986                70 /* CPL 0 only. */
 
153
#define   BDOOR_CMD_FIRMWARE_ERROR           71 /* CPL 0 only. */
 
154
#  define BDOOR_CMD_FE_INSUFFICIENT_MEM       0
 
155
#  define BDOOR_CMD_FE_EXCEPTION              1
 
156
#define   BDOOR_CMD_MAX                      72
146
157
 
147
158
 
148
159
/* 
152
163
 * the registers. Otherwise backwards compatibility will suffer.
153
164
 */
154
165
 
 
166
/* Processing mode for guest pshare hints (SENDPSHAREHINTS cmd) */
 
167
#define BDOOR_PSHARE_HINTS_ASYNC 0
 
168
#define BDOOR_PSHARE_HINTS_SYNC  1
 
169
 
 
170
#define BDOOR_PSHARE_HINTS_TYPE(ecx)   (((ecx) >> 16) & 0x1)
 
171
 
 
172
/* Version of backdoor pshare hints protocol */
 
173
#define BDOOR_PSHARE_HINTS_VERSION     1
 
174
#define BDOOR_PSHARE_HINTS_VER(ecx)    (((ecx) >> 17) & 0x7f)
 
175
 
 
176
/* Task applied to backdoor pshare hints */
 
177
#define BDOOR_PSHARE_HINTS_CMD_SHARE   0
 
178
#define BDOOR_PSHARE_HINTS_CMD_DROP    1
 
179
 
 
180
#define BDOOR_PSHARE_HINTS_CMD(ecx)   (((ecx) >> 24) & 0x1)
 
181
 
155
182
/* Nesting control operations */
156
183
 
157
184
#define NESTING_CONTROL_RESTRICT_BACKDOOR 0
201
228
static INLINE Bool
202
229
Backdoor_CmdRequiresFullyValidVCPU(unsigned cmd)
203
230
{
204
 
   return cmd == BDOOR_CMD_RSVD0 ||
205
 
          cmd == BDOOR_CMD_RSVD1 ||
206
 
          cmd == BDOOR_CMD_RSVD2;
 
231
   return cmd == BDOOR_CMD_SIDT ||
 
232
          cmd == BDOOR_CMD_SGDT ||
 
233
          cmd == BDOOR_CMD_SLDT_STR;
207
234
}
208
235
#endif
209
236