diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/vbox_utils.h | 12 | ||||
| -rw-r--r-- | include/uapi/linux/vbox_vmmdev_types.h | 60 |
2 files changed, 67 insertions, 5 deletions
diff --git a/include/linux/vbox_utils.h b/include/linux/vbox_utils.h index a240ed2a0372..ff56c443180c 100644 --- a/include/linux/vbox_utils.h +++ b/include/linux/vbox_utils.h | |||
| @@ -24,15 +24,17 @@ __printf(1, 2) void vbg_debug(const char *fmt, ...); | |||
| 24 | #define vbg_debug pr_debug | 24 | #define vbg_debug pr_debug |
| 25 | #endif | 25 | #endif |
| 26 | 26 | ||
| 27 | int vbg_hgcm_connect(struct vbg_dev *gdev, | 27 | int vbg_hgcm_connect(struct vbg_dev *gdev, u32 requestor, |
| 28 | struct vmmdev_hgcm_service_location *loc, | 28 | struct vmmdev_hgcm_service_location *loc, |
| 29 | u32 *client_id, int *vbox_status); | 29 | u32 *client_id, int *vbox_status); |
| 30 | 30 | ||
| 31 | int vbg_hgcm_disconnect(struct vbg_dev *gdev, u32 client_id, int *vbox_status); | 31 | int vbg_hgcm_disconnect(struct vbg_dev *gdev, u32 requestor, |
| 32 | u32 client_id, int *vbox_status); | ||
| 32 | 33 | ||
| 33 | int vbg_hgcm_call(struct vbg_dev *gdev, u32 client_id, u32 function, | 34 | int vbg_hgcm_call(struct vbg_dev *gdev, u32 requestor, u32 client_id, |
| 34 | u32 timeout_ms, struct vmmdev_hgcm_function_parameter *parms, | 35 | u32 function, u32 timeout_ms, |
| 35 | u32 parm_count, int *vbox_status); | 36 | struct vmmdev_hgcm_function_parameter *parms, u32 parm_count, |
| 37 | int *vbox_status); | ||
| 36 | 38 | ||
| 37 | /** | 39 | /** |
| 38 | * Convert a VirtualBox status code to a standard Linux kernel return value. | 40 | * Convert a VirtualBox status code to a standard Linux kernel return value. |
diff --git a/include/uapi/linux/vbox_vmmdev_types.h b/include/uapi/linux/vbox_vmmdev_types.h index 0e68024f36c7..26f39816af14 100644 --- a/include/uapi/linux/vbox_vmmdev_types.h +++ b/include/uapi/linux/vbox_vmmdev_types.h | |||
| @@ -102,6 +102,66 @@ enum vmmdev_request_type { | |||
| 102 | #define VMMDEVREQ_HGCM_CALL VMMDEVREQ_HGCM_CALL32 | 102 | #define VMMDEVREQ_HGCM_CALL VMMDEVREQ_HGCM_CALL32 |
| 103 | #endif | 103 | #endif |
| 104 | 104 | ||
| 105 | /* vmmdev_request_header.requestor defines */ | ||
| 106 | |||
| 107 | /* Requestor user not given. */ | ||
| 108 | #define VMMDEV_REQUESTOR_USR_NOT_GIVEN 0x00000000 | ||
| 109 | /* The kernel driver (vboxguest) is the requestor. */ | ||
| 110 | #define VMMDEV_REQUESTOR_USR_DRV 0x00000001 | ||
| 111 | /* Some other kernel driver is the requestor. */ | ||
| 112 | #define VMMDEV_REQUESTOR_USR_DRV_OTHER 0x00000002 | ||
| 113 | /* The root or a admin user is the requestor. */ | ||
| 114 | #define VMMDEV_REQUESTOR_USR_ROOT 0x00000003 | ||
| 115 | /* Regular joe user is making the request. */ | ||
| 116 | #define VMMDEV_REQUESTOR_USR_USER 0x00000006 | ||
| 117 | /* User classification mask. */ | ||
| 118 | #define VMMDEV_REQUESTOR_USR_MASK 0x00000007 | ||
| 119 | |||
| 120 | /* Kernel mode request. Note this is 0, check for !USERMODE instead. */ | ||
| 121 | #define VMMDEV_REQUESTOR_KERNEL 0x00000000 | ||
| 122 | /* User mode request. */ | ||
| 123 | #define VMMDEV_REQUESTOR_USERMODE 0x00000008 | ||
| 124 | /* User or kernel mode classification mask. */ | ||
| 125 | #define VMMDEV_REQUESTOR_MODE_MASK 0x00000008 | ||
| 126 | |||
| 127 | /* Don't know the physical console association of the requestor. */ | ||
| 128 | #define VMMDEV_REQUESTOR_CON_DONT_KNOW 0x00000000 | ||
| 129 | /* | ||
| 130 | * The request originates with a process that is NOT associated with the | ||
| 131 | * physical console. | ||
| 132 | */ | ||
| 133 | #define VMMDEV_REQUESTOR_CON_NO 0x00000010 | ||
| 134 | /* Requestor process is associated with the physical console. */ | ||
| 135 | #define VMMDEV_REQUESTOR_CON_YES 0x00000020 | ||
| 136 | /* Console classification mask. */ | ||
| 137 | #define VMMDEV_REQUESTOR_CON_MASK 0x00000030 | ||
| 138 | |||
| 139 | /* Requestor is member of special VirtualBox user group. */ | ||
| 140 | #define VMMDEV_REQUESTOR_GRP_VBOX 0x00000080 | ||
| 141 | |||
| 142 | /* Note: trust level is for windows guests only, linux always uses not-given */ | ||
| 143 | /* Requestor trust level: Unspecified */ | ||
| 144 | #define VMMDEV_REQUESTOR_TRUST_NOT_GIVEN 0x00000000 | ||
| 145 | /* Requestor trust level: Untrusted (SID S-1-16-0) */ | ||
| 146 | #define VMMDEV_REQUESTOR_TRUST_UNTRUSTED 0x00001000 | ||
| 147 | /* Requestor trust level: Untrusted (SID S-1-16-4096) */ | ||
| 148 | #define VMMDEV_REQUESTOR_TRUST_LOW 0x00002000 | ||
| 149 | /* Requestor trust level: Medium (SID S-1-16-8192) */ | ||
| 150 | #define VMMDEV_REQUESTOR_TRUST_MEDIUM 0x00003000 | ||
| 151 | /* Requestor trust level: Medium plus (SID S-1-16-8448) */ | ||
| 152 | #define VMMDEV_REQUESTOR_TRUST_MEDIUM_PLUS 0x00004000 | ||
| 153 | /* Requestor trust level: High (SID S-1-16-12288) */ | ||
| 154 | #define VMMDEV_REQUESTOR_TRUST_HIGH 0x00005000 | ||
| 155 | /* Requestor trust level: System (SID S-1-16-16384) */ | ||
| 156 | #define VMMDEV_REQUESTOR_TRUST_SYSTEM 0x00006000 | ||
| 157 | /* Requestor trust level >= Protected (SID S-1-16-20480, S-1-16-28672) */ | ||
| 158 | #define VMMDEV_REQUESTOR_TRUST_PROTECTED 0x00007000 | ||
| 159 | /* Requestor trust level mask */ | ||
| 160 | #define VMMDEV_REQUESTOR_TRUST_MASK 0x00007000 | ||
| 161 | |||
| 162 | /* Requestor is using the less trusted user device node (/dev/vboxuser) */ | ||
| 163 | #define VMMDEV_REQUESTOR_USER_DEVICE 0x00008000 | ||
| 164 | |||
| 105 | /** HGCM service location types. */ | 165 | /** HGCM service location types. */ |
| 106 | enum vmmdev_hgcm_service_location_type { | 166 | enum vmmdev_hgcm_service_location_type { |
| 107 | VMMDEV_HGCM_LOC_INVALID = 0, | 167 | VMMDEV_HGCM_LOC_INVALID = 0, |
