Patent ID: 8464028

Claim:
A method comprising: in a processor, detecting an intercept of an instruction that is in a guest that is controlled by a virtual machine monitor (VMM), wherein the instruction has an associated instruction pointer (IP) used to locate the instruction in memory; detecting a match by the associated IP in an IP redirect table responsive to detecting the intercept; redirecting instruction fetch in the processor to a routine identified in the IP redirect table responsive to the match instead of exiting the guest to the VMM; fetching a second instruction in the guest, wherein the second instruction is represented in the IP redirect table with a first IP of the second instruction and a corresponding second IP of a corresponding routine to be executed instead of exiting the guest in response to intercepting the second instruction in the guest; a branch predictor predicting the second IP as a target address for the second instruction responsive to the first IP; responsive to the predicting, fetching from the second IP; and inhibiting the IP redirect table from redirecting fetching to the second IP in response to an intercept of the second instruction, responsive to detecting that the branch predictor predicted the second IP as the target address.