Various embodiments of the present invention are directed to methods by
which a virtual-machine monitor can introduce branch instructions, in
order to emulate privileged and other instructions on behalf of a guest
operating system, into guest-operating-system code residing on virtually
aliased virtual-memory pages. In a described embodiment of the present
invention, the virtual-machine monitor physically aliases each virtual
alias for a particular physical memory page by allocating a physical page
for the virtual alias, copying the original contents of the physical
memory page to the allocated physical page, or physical alias page, and
subsequently patching each physical alias page appropriate to the
physical address of the physical alias page.