VID_IRET_Proc


include vpicd.inc

clc
cmp     [TimeOut],0
jz      no_timeout
stc

no_timeout:
mov     eax, IRQHandle
mov     ebx, VMHandle
call    VID_IRET_Proc

Handles attempts by a virtual machine to return from an interrupt. The system calls this procedure whenever a virtual machine executes an iret instruction, or whenever a time out occurs for a simulated interrupt.

The system disables interrupts before calling this procedure. The procedure can re-enable interrupts if necessary. Uses EAX, EBX, ECX, EDX, ESI, and Flags.

IRQHand

Handle of the interrupt request.

VM

Handle of the current virtual machine.

This procedure is useful for devices that must simulate large numbers of interrupts in a short period of time. For example, the virtual COM device simulates an interrupt, allows one character to be read from the COM port, and waits for the virtual machine to execute an iret instruction before putting more data into the virtual COM receive buffer.