VID_Hw_Int_Proc

include vpicd.inc

mov eax, IRQHand ; IRQ handle

mov ebx, VMId ; current VM handle

call VID_Hw_Int_Proc

jc not_handled ; carry flag set if interrupt not handled


The VID_Hw_Int_Proc procedure handles hardware interrupts for a virtual device. The system calls the procedure whenever a hardware interrupt occurs. Typically, VID_Hw_Int_Proc services the physical device, calls the VPICD_Phys_EOI service to end the physical interrupt, and sets the virtual IRQ request for a specific virtual machine.

The system disables interrupts before calling this procedure. The procedure can re-enable interrupts if necessary.

Parameters

IRQHand

Specifies the handle identifying the interrupt request.

VMId

Specifies the handle identifying the current virtual machine.

Return Value

The procedure clears the carry flag if it processed the interrupt. If the IRQ can be shared, the procedure can direct the system to pass the interrupt to the next handler by setting the carry flag. In this case, it must not process the interrupt.

Comments

The VMM services the procedure is allowed to call is limited. If processing the interrupt requires use of restricted services, this procedure should use the Schedule_Call_Global_Event service to schedule an event that performs the additional processing.

This procedure may modify the EAX, EBX, ECX, EDX, ESI, and Flags registers.

This procedure must return using the ret instruction, not an iret instruction.