Hypercall Continuation
You can think of a hypercall as a complex instruction that takes many cycles. The hypervisor tries to limit hypercall execution to 50 microseconds or less before it returns control to the virtual processor that called the hypercall. Some hypercall operations are sufficiently complex so that a 50 microsecond guarantee is difficult to make. Therefore, the hypervisor relies on a hypercall continuation mechanism for some simple hypercalls and all rep hypercalls.
The hypercall continuation mechanism is mostly transparent to the caller. If a hypercall cannot complete within the prescribed time limit, it returns control back to the caller. However, the hypervisor does not advance the instruction pointer past the instruction that called the hypercall. This enables the hypervisor to handle pending interrupts and schedule other virtual processors. When the original calling thread resumes execution, it will reexecute the hypercall instruction and make progress toward completing the operation.
Most simple hypercalls are guaranteed to complete within the prescribed time limit. However, some simple hypercalls might require more time. These hypercalls use hypercall continuation in a similar manner to rep hypercalls. In these cases, the operation involves two or more internal states. The first call puts the object (for example, the partition or virtual processor) into an intermediate internal state. After repeated calls, the state transitions to a terminal state. For each hypercall that follows this pattern, the visible side effect of intermediate internal states is described in the Remarks section of each hypercall reference page.
Send comments about this topic to Microsoft
Build date: 11/16/2013