vmmouse: Add support for the access restrict command

The access restrict command, if implemented, restricts vmmouse port
access to the indicated level.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Michael Banack <banackm@vmware.com>
This commit is contained in:
Thomas Hellstrom
2015-01-15 10:59:46 +01:00
parent d5c1493b5f
commit c8ec00f537
3 changed files with 15 additions and 0 deletions

View File

@@ -191,6 +191,13 @@ VMMouseClient_Enable(void) {
return FALSE;
}
/*
* Restrict access to the VMMouse backdoor handler.
*/
vmpc.in.vEbx = VMMOUSE_RESTRICT_IOPL;
vmpc.in.command = VMMOUSE_PROTO_CMD_ABSPOINTER_RESTRICT;
VMMouseProto_SendCmd(&vmpc);
/*
* To quote Jeremy, "Go Go Go!"
*/

View File

@@ -69,4 +69,11 @@
#define VMMOUSE_RIGHT_BUTTON 0x10
#define VMMOUSE_MIDDLE_BUTTON 0x08
/*
* VMMouse Restrict command
*/
#define VMMOUSE_RESTRICT_ANY 0x00
#define VMMOUSE_RESTRICT_CPL0 0x01
#define VMMOUSE_RESTRICT_IOPL 0x02
#endif

View File

@@ -64,6 +64,7 @@
#define VMMOUSE_PROTO_CMD_ABSPOINTER_DATA 39
#define VMMOUSE_PROTO_CMD_ABSPOINTER_STATUS 40
#define VMMOUSE_PROTO_CMD_ABSPOINTER_COMMAND 41
#define VMMOUSE_PROTO_CMD_ABSPOINTER_RESTRICT 86
#define DECLARE_REG32_STRUCT(_r) \
union { \