RestrictedEventCallback


include vmm.inc

mov     ebx, VMHandle
mov     edi, ThreadHandle
mov     edx, RefData
mov     ebp, OFFSET32 Client_Reg_Struc
call    [RestrictedEventCallback]

Performs programmer-defined processing of a restricted event for a virtual machine or thread. RestrictedEventCallback is a programmer-defined callback function installed by the Call_Restricted_Event service. The callback function can modify the EAX, EBX, ECX, EDX, ESI, EDI, and Flags registers. The callback function must return with interrupts enabled and the direction flag clear (up).

VMHandle

Handle of the current virtual machine. If a timeout occurs, this handle may not be valid. In such cases, the callback function should use the Get_Cur_VM_Handle service to get the handle of the current virtual machine.

ThreadHandle

Handle of the current thread. If a timeout occurs, this handle may not be valid. In such cases, the callback function should use the Get_Cur_Thread_Handle service to get the handle of the current thread.

RefData

Reference data supplied by the virtual machine that initiated the priority event.

Client_Reg_Struc

Address of a Client_Reg_Struc structure containing the contents of the virtual machine's registers.

If a timeout occurs, any priority boost is automatically canceled, even if the the PEF_Dont_Unboost flag was specified in the Call_Restricted_Event function that initiated the event.

If the PEF_Time_Out bit was set when the event was scheduled, additional information is given in the flags register, as described in Call_Restricted_Event. Such an event callback procedure should begin as follows:


mov  hThisEvent, 0         ; (See 'Cancelling Events')
                       ; (Must preserve carry!)
jc   Event_Timed_Out       ; Carry set means event timed out
                       ; Else event processed normally

For additional information about event callbacks, see Event Callbacks.

See also Call_Restricted_Event, Cancel_Restricted_Event, Client_Reg_Struc, Get_Cur_Thread_Handle, Get_Cur_VM_Handle