Adaptive dynamic selection and application of multiple virtualization techniques
AssigneeVMware, Inc.
InventorsKeith M. Adams, Jeffrey W. Sheldon, Vyacheslav V. Malyugin
Life of this patent
Estimating the term…
Abstract
Autonomous selection between multiple virtualization techniques implemented in a virtualization layer of a virtualized computer system. The virtual machine monitor implements multiple virtualization support processors that each provide for the comprehensive handling of potential virtualization exceptions. A virtual machine monitor resident virtualization selection control is operable to select between use of first and second virtualization support processors dependent on identifying a predetermined pattern of temporally local privilege dependent instructions within a portion of an instruction stream as encountered in the execution of a guest operating system.
Claims24
A system that virtualizes a computer, the system comprising:
- a processor and a memory;
- a virtual-machine monitor executing on the processor;
- a virtual machine managed by the virtual-machine monitor, the virtual machine executing an instruction stream that includes two or more privilege-dependent instructions;
- and
- a virtualization-selection control that is invoked by the virtual-machine monitor following a trap and virtual-machine-exit transition which occurs when the processor attempts to execute a first privilege-dependent instruction and that selects one of multiple virtualization-support subsystems estimated to have a lowest performance overhead to process a sequence of instructions which follows the first privilege-dependent instruction in the instruction stream executed by the virtual machine, the sequence of instructions including one or more additional privilege-dependent instructions and any non privilege-dependent instructions temporally located between the privilege-dependent instructions, the multiple virtualization-support subsystems including
- a first virtualization-support subsystem that emulates execution of the first privilege-dependent instruction, then executes a virtual-machine-entry transition, and that is again invoked to emulate each of the one or more additional privilege-dependent instructions, and
- a second virtualization-support subsystem that emulates execution of the first privilege-dependent instruction as well as the sequence of instructions prior to executing a virtual-machine-entry transition.
A method, carried out by a system that virtualizes a computer and that has a processor, a memory, a virtual-machine monitor executing on the processor, and a virtual machine managed by the virtual-machine monitor that executes an instruction stream that includes one or more privilege-dependent instructions, the method comprising:
- collecting, by the virtual-machine monitor, performance data for execution of instructions by the virtual machine;
- identifying, by the virtual-machine monitor, sequences of instructions that include multiple privilege-dependent instructions that are repeatedly executed by the virtual machine, the occurrence of which in the instruction stream can be predicted based on preceding instructions;
- and
- maintaining a virtualization-selection control that is invoked following a trap and virtual-machine-exit transition that occurs when the processor attempts to execute a first privilege-dependent instruction and that selects one of multiple virtualization-support subsystems that is estimated to have a lowest performance overhead to process a sequence of instructions that includes one or more additional privilege-dependent instructions and that is predicted to follow the first privilege-dependent instruction in the instruction stream executed by the virtual machine, the multiple virtualization-support subsystems including
- a first virtualization-support subsystem that emulates execution of the first privilege-dependent instruction, then executes a virtual-machine-entry transition, and that is again invoked to emulate each of the one or more additional privilege-dependent instructions, and
- a second virtualization-support subsystem that is invoked by the virtual-machine monitor to emulate execution of the first privilege-dependent instruction as well as the sequence of instructions that includes one or more additional privilege-dependent instructions prior to executing a virtual-machine-entry transition.
A non-transitory computer-readable medium that contains processor instructions that, when executed by a processor within a system that virtualizes a computer and that has a memory, a virtual-machine monitor executing on the processor, and a virtual machine managed by the virtual-machine monitor that executes an instruction stream that includes one or more privilege-dependent instructions, control the system to:
- collect, by the virtual-machine monitor, performance data for execution of instructions by the virtual machine;
- identify, by the virtual-machine monitor, sequences of instructions that include multiple privilege-dependent instructions that are repeatedly executed by the virtual machine, the occurrence of which in the instruction stream can be predicted based on preceding instructions;
- and
- maintain a virtualization-selection control that is invoked following a trap and virtual-machine-exit transition that occurs when the processor attempts to execute a first privilege-dependent instruction and that selects one of multiple virtualization-support subsystems that is estimated to have a lowest performance overhead to process a sequence of instructions that includes one or more additional privilege-dependent instructions and that is predicted to follow the first privilege-dependent instruction in the instruction stream executed by the virtual machine, the multiple virtualization-support subsystems including
- a first virtualization-support subsystem that emulates execution of the first privilege-dependent instruction, then executes a virtual-machine-entry transition, and that is again invoked to emulate each of the one or more additional privilege-dependent instructions, and
- a second virtualization-support subsystem that is invoked by the virtual-machine monitor to emulate execution of the first privilege-dependent instruction as well as the sequence of instructions that includes one or more additional privilege-dependent instructions prior to executing a virtual-machine-entry transition.
Dependencies are inferred from the claim text.