主权项 |
1. A CPU having operational modes comprising at least a normal mode, a record mode, and a replay mode, wherein:
the CPU is configured such that when the CPU is in the record mode, each time an instruction included in a predefined subset of an instruction set of the CPU is executed in a virtual computing instance, a result of execution of the instruction is stored in a buffer without a context switch to a virtualization software hosting the virtual computing instance, the CPU triggering a fault or exception to perform the context switch and move contents of the buffer into a log file that is accessible by the virtualization software when the buffer is full; and the CPU is further configured such that when the CPU is in the replay mode, each time the instruction included in the predefined subset is executed, a next non-deterministic value is read from the buffer without a context switch to the virtualization software and supplied in place of a result of the execution of the instruction, the CPU triggering a fault or exception to perform the context switch to the virtualization software and move contents of the log file into the buffer, when the buffer does not contain the next non-deterministic value; wherein the predefined subset comprises instructions that generate non-deterministic values. |