Begin_Nest_Exec

include vmm.inc

VMMCall Begin_Nest_Exec
 

Starts a nested execution block. This service is used in conjunction with the End_Nest_Exec service to create a nested execution block in which a virtual device may call Exec_Int, Resume_Exec, and the various simulation services. Virtual devices use these services to call software in the virtual machine. Uses Client_CS, Client_IP, and Flags.

While in a nested execution block, a virtual device may call the Exec_Int and Resume_Exec services any number of times.

If one of these calls changes the virtual machine registers, these changes are also made to the client state. Before creating the nested execution block, a virtual device should save the client state by using the Save_Client_State service. After ending the nested execution block, a virtual device should restore the client state by using the Restore_Client_State service.

This service forces the virtual machine into protected-mode execution if there is a protected-mode application running in the current virtual machine. Otherwise, the virtual machine remains in V86 mode. The End_Nest_Exec service restores the virtual machine to its mode prior to the call to Begin_Nest_Exec.

This service automatically switches the virtual machine to the locked protected-mode stack (unless the VM is already using the locked stack) and End_Nest_Exec switches it back. This allows most devices to change execution modes without worrying about demand paging issues.

See Also

Begin_Nest_V86_Exec, End_Nest_Exec, Exec_Int, Restore_Client_State, Resume_Exec, Save_Client_State