A first software entity occupies a portion of a linear address space of a
second software entity and prevents the second software entity from
accessing the memory of the first software entity. For example, in one
embodiment of the invention, the first software entity is a virtual
machine monitor (VMM), which supports a virtual machine (VM), the second
software entity. The VMM sometimes directly executes guest instructions
from the VM and, at other times, the VMM executes binary translated
instructions derived from guest instructions. When executing binary
translated instructions, the VMM uses memory segmentation to protect its
memory. When directly executing guest instructions, the VMM may use
either memory segmentation or a memory paging mechanism to protect its
memory. When the memory paging mechanism is active during direct
execution, the protection from the memory segmentation mechanism may be
selectively deactivated to improve the efficiency of the virtual computer
system.