[PATCH 2/2] vmmouse: Add support for the access restrict command
Thomas Hellstrom
thellstrom at vmware.com
Tue Apr 7 02:05:13 PDT 2015
The access restrict command, if implemented, restricts vmmouse port
access to the indicated level.
Signed-off-by: Thomas Hellstrom <thellstrom at vmware.com>
Reviewed-by: Michael Bancak <banackm at vmware.com>
---
shared/vmmouse_client.c | 7 +++++++
shared/vmmouse_defs.h | 7 +++++++
shared/vmmouse_proto.h | 1 +
3 files changed, 15 insertions(+)
diff --git a/shared/vmmouse_client.c b/shared/vmmouse_client.c
index b8e19d6..c5d529e 100644
--- a/shared/vmmouse_client.c
+++ b/shared/vmmouse_client.c
@@ -192,6 +192,13 @@ VMMouseClient_Enable(void) {
}
/*
+ * 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!"
*/
diff --git a/shared/vmmouse_defs.h b/shared/vmmouse_defs.h
index d256faf..780d72d 100644
--- a/shared/vmmouse_defs.h
+++ b/shared/vmmouse_defs.h
@@ -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
diff --git a/shared/vmmouse_proto.h b/shared/vmmouse_proto.h
index 714f8c5..6d144ae 100644
--- a/shared/vmmouse_proto.h
+++ b/shared/vmmouse_proto.h
@@ -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 { \
--
2.1.0
More information about the xorg-devel
mailing list