Hook_Invalid_Page_Fault

include vmm.inc

mov     esi, OFFSET32 Callback  ; procedure to install
VMMCall Hook_Invalid_Page_Fault

jc      not_installed           ; carry flag set if procedure not installed
 

Installs a procedure to handle any invalid-page faults not handled by the system invalid-page-fault handler. Uses Flags.

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

The system enables interrupts, and calls the procedure as follows:

mov     ebx, VM             ; current VM handle
mov     edi, OFFSET32 ipf   ; points to an IPF_Data
call    [Callback]

jc      not_corrected       ; carry flag set if procedure did
                            ; not correct fault
 

The VM parameter is a handle identifying the current virtual machine, and the ipf parameter points to an IPF_Data structure containing information about the page fault.

If the callback procedure handles the page fault (for example, by mapping a page into the VM or by altering the page protections), it should return carry clear. Otherwise, the callback should return carry set to indicate that the system should pass the fault to the next procedure in the chain.

The procedure may use all registers except the segment registers.

See Also

Unhook_Invalid_Page_Fault