Controlling virtual machines based on performance counters
AssigneeIntel Corporation
InventorsErik C. Cota-Robles, Steven M. Bennett, Andrew V. Anderson, Sebastian Schoenberg
Life of this patent
Estimating the term…
Abstract
Embodiments of apparatuses, methods, and systems for controlling virtual machines based on performance counters are disclosed. In one embodiment, an apparatus includes an event counter, a comparator, and virtualization control logic. The event counter is to keep an event count based on the number of occurrences of an event. The comparator is to determine whether the event count has reached a threshold value. The virtualization control logic is to transfer control of the apparatus from a guest to a host in response to the comparator determining that the event count has reached the threshold value.
Claims17
An apparatus comprising:
- a first event counter to keep a first event count based on the number of occurrences of a first event;
- a second event counter to keep a second event count based on the number of occurrences of a second event, wherein the first event counter is to decrement the first event count when the second event count reaches a window value;
- a comparator to determine whether the first event count has reached a threshold value;
- and
- virtualization control logic to transfer control of the apparatus between a guest and a host in response to the comparator determining that the first event count has reached the threshold value, and to store the first event count to a virtual machine control structure stored in a memory prior to the transfer of control of the apparatus between the guest and the host, the virtual machine control structure to contain a state of the guest, a state of the host, and control information.
A method comprising:
- configuring a first event counter in a processor to keep a first event count based on occurrences of a first event;
- configuring a second event counter in the processor to keep a second event count based on occurrences of a second event;
- incrementing the first event counter for each occurrence of the first event;
- decrementing the first event counter for each elapse of a period of time, based on the second event count;
- determining whether the first event count has reached a threshold value;
- transferring control of the processor between a guest and a host in response to determining that the first event count has reached the threshold value;
- and
- storing the first event count to a virtual machine control structure stored in a memory.
A system comprising:
- a processor including:
- a first event counter to keep a first event count based on the number of occurrences of a first event,
- a second event counter to keep a second event count based on the number of occurrences of a second event, wherein the first event counter is to decrement the first event count when the second event count reaches a window value,
- a comparator to determine whether the first event count has reached a threshold value, and
- virtualization control hardware to transfer control of the processor between a guest running on a virtual machine and a host running outside the virtual machine, in response to the comparator determining that the first event count has reached the threshold value, and to store the first event count to a data structure;
- and
- a memory to store the data structure to control the virtual machine.
Dependencies are inferred from the claim text.