The Virtual Machine Monitor (VMM)

When the processor's internal hardware associated with VM86 mode detects that the currently executing DOS task is attempting a potentially disruptive action, it suspends the VM86 task and jumps to the GP (General Protection) exception handler. As with any exception, before jumping to the exception handler, the processor first stores the current EFlags register contents (along with CS and EIP) on the stack. It then clears the EFlags[VM] bit, disabling VM86 mode. Upon entry to the GP exception handler, the programmer examines the VM bit in the EFlags image stored on the stack to determine if the exception was generated by a DOS task (i.e., EFlags[VM] = 1). If it was, the GP exception handler jumps to the watchdog program. If it wasn't, the body of the normal, Protected Mode GP exception handler is executed.

The watchdog program associated with a DOS task is referred to as the Virtual Machine Monitor (VMM). The VMM's job is to identify the action attempted by the DOS task and to accomplish it in a manner that is not disruptive to the multitasking OS or to the other, currently suspended tasks. In order to have full access to all of the processor's facilities to deal with problems, the VMM executes at privilege level 0.

Having emulated the potentially disruptive action in a benign fashion, the VMM program then resumes execution of the DOS task at the instruction after the one that caused the exception.

The discussion in this chapter indicates that the GP exception handler code determines whether a VM86 task was executing when the exception occurred and that it jumps to the VMM program if this is the case. Please note that rather than having the GP handler jump to the VMM program, the VMM program itself could serve as the GP exception handler.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.98.108