Changeset 71136 in vbox for trunk/include/iprt/nt
- Timestamp:
- Feb 27, 2018 1:17:36 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/nt/vid.h
r71131 r71136 108 108 typedef VID_IOCTL_INPUT_MESSAGE_SLOT_HANDLE_AND_GET_NEXT const *PCVID_IOCTL_INPUT_MESSAGE_SLOT_HANDLE_AND_GET_NEXT; 109 109 110 111 RT_C_DECLS_BEGIN112 113 /** Calling convention. */114 #ifndef WINAPI115 # define VIDAPI __stdcall116 #else117 # define VIDAPI WINAPI118 #endif119 120 /** Partition handle. */121 #ifndef WINAPI122 typedef void *VID_PARTITION_HANDLE;123 #else124 typedef HANDLE VID_PARTITION_HANDLE;125 #endif126 127 /**128 * Gets the partition ID.129 *130 * The partition ID is the numeric identifier used when making hypercalls to the131 * hypervisor.132 */133 DECLIMPORT(BOOL) VIDAPI VidGetHvPartitionId(VID_PARTITION_HANDLE hPartition, HV_PARTITION_ID *pidPartition);134 135 /**136 * Starts asynchronous execution of a virtual CPU.137 */138 DECLIMPORT(BOOL) VIDAPI VidStartVirtualProcessor(VID_PARTITION_HANDLE hPartition, HV_VP_INDEX iCpu);139 140 /**141 * Stops the asynchronous execution of a virtual CPU.142 *143 * @retval ERROR_VID_STOP_PENDING if busy with intercept, check messages.144 */145 DECLIMPORT(BOOL) VIDAPI VidStopVirtualProcessor(VID_PARTITION_HANDLE hPartition, HV_VP_INDEX iCpu);146 147 /**148 * WHvCreateVirtualProcessor boils down to a call to VidMessageSlotMap and149 * some internal WinHvPlatform state fiddling.150 *151 * Looks like it maps memory and returns the pointer to it.152 * VidMessageSlotHandleAndGetNext is later used to wait for the next message and153 * put (??) it into that memory mapping.154 *155 * @returns Success indicator (details in LastStatusValue and LastErrorValue).156 *157 * @param hPartition The partition handle.158 * @param pOutput Where to return the pointer to the message memory159 * mapping. The CPU index is also returned here.160 * @param iCpu The CPU to wait-and-get messages for.161 */162 DECLIMPORT(BOOL) VIDAPI VidMessageSlotMap(VID_PARTITION_HANDLE hPartition, PVID_MAPPED_MESSAGE_SLOT pOutput, HV_VP_INDEX iCpu);163 164 /**165 * This is used by WHvRunVirtualProcessor to wait for the next exit msg.166 *167 * The message appears in the memory mapping returned by VidMessageSlotMap.168 *169 * @returns Success indicator (details only in LastErrorValue - LastStatusValue170 * is not set).171 * @retval STATUS_TIMEOUT for STATUS_TIMEOUT as well as STATUS_USER_APC and172 * STATUS_ALERTED.173 *174 * @param hPartition The partition handle.175 * @param iCpu The CPU to wait-and-get messages for.176 * @param fFlags Flags. At least one of the two flags must be set:177 * - VID_MSHAGN_F_GET_NEXT_MESSAGE (bit 0)178 * - VID_MSHAGN_F_HANDLE_MESSAGE (bit 1)179 * @param cMillies The timeout, presumably in milliseconds.180 *181 * @todo Would be awfully nice if someone at Microsoft could hit at the182 * flags here.183 * @note184 */185 DECLIMPORT(BOOL) VIDAPI VidMessageSlotHandleAndGetNext(VID_PARTITION_HANDLE hPartition, HV_VP_INDEX iCpu,186 uint32_t fFlags, uint32_t cMillies);187 110 /** @name VID_MSHAGN_F_GET_XXX - Flags for VidMessageSlotHandleAndGetNext 188 111 * @{ */ … … 196 119 /** @} */ 197 120 121 122 #ifdef IN_RING3 123 RT_C_DECLS_BEGIN 124 125 /** Calling convention. */ 126 #ifndef WINAPI 127 # define VIDAPI __stdcall 128 #else 129 # define VIDAPI WINAPI 130 #endif 131 132 /** Partition handle. */ 133 #ifndef WINAPI 134 typedef void *VID_PARTITION_HANDLE; 135 #else 136 typedef HANDLE VID_PARTITION_HANDLE; 137 #endif 138 139 /** 140 * Gets the partition ID. 141 * 142 * The partition ID is the numeric identifier used when making hypercalls to the 143 * hypervisor. 144 */ 145 DECLIMPORT(BOOL) VIDAPI VidGetHvPartitionId(VID_PARTITION_HANDLE hPartition, HV_PARTITION_ID *pidPartition); 146 147 /** 148 * Starts asynchronous execution of a virtual CPU. 149 */ 150 DECLIMPORT(BOOL) VIDAPI VidStartVirtualProcessor(VID_PARTITION_HANDLE hPartition, HV_VP_INDEX iCpu); 151 152 /** 153 * Stops the asynchronous execution of a virtual CPU. 154 * 155 * @retval ERROR_VID_STOP_PENDING if busy with intercept, check messages. 156 */ 157 DECLIMPORT(BOOL) VIDAPI VidStopVirtualProcessor(VID_PARTITION_HANDLE hPartition, HV_VP_INDEX iCpu); 158 159 /** 160 * WHvCreateVirtualProcessor boils down to a call to VidMessageSlotMap and 161 * some internal WinHvPlatform state fiddling. 162 * 163 * Looks like it maps memory and returns the pointer to it. 164 * VidMessageSlotHandleAndGetNext is later used to wait for the next message and 165 * put (??) it into that memory mapping. 166 * 167 * @returns Success indicator (details in LastStatusValue and LastErrorValue). 168 * 169 * @param hPartition The partition handle. 170 * @param pOutput Where to return the pointer to the message memory 171 * mapping. The CPU index is also returned here. 172 * @param iCpu The CPU to wait-and-get messages for. 173 */ 174 DECLIMPORT(BOOL) VIDAPI VidMessageSlotMap(VID_PARTITION_HANDLE hPartition, PVID_MAPPED_MESSAGE_SLOT pOutput, HV_VP_INDEX iCpu); 175 176 /** 177 * This is used by WHvRunVirtualProcessor to wait for the next exit msg. 178 * 179 * The message appears in the memory mapping returned by VidMessageSlotMap. 180 * 181 * @returns Success indicator (details only in LastErrorValue - LastStatusValue 182 * is not set). 183 * @retval STATUS_TIMEOUT for STATUS_TIMEOUT as well as STATUS_USER_APC and 184 * STATUS_ALERTED. 185 * 186 * @param hPartition The partition handle. 187 * @param iCpu The CPU to wait-and-get messages for. 188 * @param fFlags Flags. At least one of the two flags must be set: 189 * - VID_MSHAGN_F_GET_NEXT_MESSAGE (bit 0) 190 * - VID_MSHAGN_F_HANDLE_MESSAGE (bit 1) 191 * @param cMillies The timeout, presumably in milliseconds. 192 * 193 * @todo Would be awfully nice if someone at Microsoft could hit at the 194 * flags here. 195 * @note 196 */ 197 DECLIMPORT(BOOL) VIDAPI VidMessageSlotHandleAndGetNext(VID_PARTITION_HANDLE hPartition, HV_VP_INDEX iCpu, 198 uint32_t fFlags, uint32_t cMillies); 198 199 /** 199 200 * Gets the processor running status. … … 219 220 220 221 RT_C_DECLS_END 222 #endif /* IN_RING3 */ 221 223 222 224 #endif
Note:
See TracChangeset
for help on using the changeset viewer.