IP Library Granted Patent US 8,819,699
Granted Patent B2
US 8,819,699 · App. 11/618,446 · Granted Aug 26, 2014

Controlling virtual machines based on performance counters

Inventors: Erik C. Cota-Robles (Mountain View, CA); Steven M. Bennett (Hillsboro, OR); Andrew V. Anderson (Hillsboro, OR); Sebastian Schoenberg (Hillsboro, OR)
Assignee: Intel Corporation
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,819,699
App. No.
11/618,446
Granted
Aug 26, 2014
Kind
B2
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.

Claims (34)

1. 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.

2. The apparatus of claim 1 , wherein the first event is instruction retirement.

3. The apparatus of claim 1 , further comprising a programmable event selection storage location to select a condition resulting from the execution of software as the first event.

4. The apparatus of claim 1 , further comprising a programmable threshold storage location to store the threshold value.

5. The apparatus of claim 1 , wherein the first event counter is to increment the first event count for each occurrence of the first event.

6. The apparatus of claim 5 , wherein the first event counter is to decrement the first event count for each elapse of a period of time corresponding to the window value.

7. The apparatus of claim 6 , further comprising a programmable window size storage location to store a window size corresponding to the window value to define the period of time.

8. The apparatus of claim 6 , wherein the second event counter is to keep a clock count, where the clock count is to be used to determine whether a number of clock cycles corresponding to the period of time have elapsed.

9. 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.

10. The method of claim 9 , wherein the first event is instruction retirement.

11. The method of claim 9 , wherein configuring the first event counter includes selecting a condition resulting from the execution of software as the first event.

12. The method of claim 9 , further comprising storing the threshold value in a threshold storage location accessible to the processor.

13. The method of claim 9 , further comprising defining the period of time by storing a window size in a window size storage location accessible to the processor.

14. The method of claim 9 , further comprising counting clock cycles to determine whether a number of clock cycles corresponding to the period of time have elapsed.

15. The method of claim 9 , further comprising transferring control of the processor from the host to the guest after configuring the first event counter and the second event counter and before comparing the first event count to the threshold value.

16. 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.

17. The system of claim 16 , wherein the memory is dynamic random access memory, and the data structure comprises a virtual machine control structure.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 6, 2012
From: COTA-ROBLES, ERIK C.; BENNETT, STEVEN M.; ANDERSON, ANDREW V.; SCHOENBERG, SEBASTIAN
To: INTEL CORPORATION
Reel/Frame 027814/0755 →
Continuity (1)
Related Publication 20080163254A1 · Jul 3, 2008