Call_When_VM_Ints_Enabled


include vmm.inc

mov     edx, RefData            ; reference data
mov     esi, OFFSET32 Callback  ; points to callback procedure
VMMcall Call_When_VM_Ints_Enabled

Installs a callback procedure that the system calls when the virtual machine enables interrupts. This service calls the callback procedure immediately if interrupts are already enabled. Virtual devices use this service to ensure that virtual machine interrupts are enabled before carrying out some action, such as calling a callback procedure in the virtual machine. Uses Client_Flags, Flags.

RefData

Reference data to be passed to the callback procedure.

Callback

Address of the callback procedure to install. For more information about the callback procedure, see below.

It is usually more convenient to use the Call_Priority_VM_Event service instead of calling this service directly. However, this service is faster. The callback procedure is automatically uninstalled when it is called.

The system calls the callback procedure as follows:


mov     ebx, VM                  ; current VM handle
mov     edx, OFFSET32 RefData    ; points to reference data
mov     ebp, OFFSET32 crs        ; points to a Client_Reg_Struc
call    [Callback]

The VM parameter is a handle identifying the current virtual machine, the RefData parameter points to the reference data specified when the callback procedure was installed, and the crs parameter points to a Client_Reg_Struc structure containing the register values for the virtual machine.

The callback procedure may use the EAX, EBX, ECX, EDX, ESI, EDI, and Flags registers.

See also Call_When_Idle, Call_When_Not_Critical, Call_When_Task_Switched