Method for dynamically managing power in microprocessor chips according to present processing demands

A method, system, and computer program product are disclosed for dynamically managing power in a microprocessor chip that includes physical hardware elements within the microprocessor chip. A process is selected to be executed. Hardware elements that are necessary to execute the process are then identified. The power in the microprocessor chip is dynamically altered by altering a present power state of the hardware elements that were identified as being necessary.

BACKGROUND OF THE INVENTION

1. Technical Field

The present invention relates generally to the field of data processing systems, and more specifically to a method, system, and computer program product for dynamically managing power within a microprocessor chip by selectively altering the present power state of individual physical hardware elements included in the chip according to the present processing demands placed on the chip.

2. Description of Related Art

A microprocessor chip is a device that is fabricated using a single piece of silicon. The microprocessor chip may also be called a chip or an integrated circuit. One or more hardware elements are fabricated on the single microprocessor chip. The hardware elements generally include processing cores and caches, but may also include special functional elements such as compression engines, encryption engines, protocol processing engines, architecture emulation engines, and data stream processing engines. The number of hardware elements that are included in a microprocessor chip is increasing over time driven by two factors: (1) technology advances are enabling more circuits to be packaged per chip, soon reaching the levels of billions of circuits per chip, and (2) the performance improvement for a single core (“single thread performance”) is slowing down because of slowing improvements in circuit speed and diminishing returns in instruction-level parallelism.

A processing core also includes multiple sub-elements such as a floating point unit, a load/store unit, an instruction sequencing unit, a fixed point execution unit, an instruction fetch unit, a branch execution unit, and possibly other sub-elements. Some processing cores include several instances of the same type of unit. For example, a processing core may include several separate floating point units and/or several separate load/store units. The terms “processing core” and “processor” are used interchangeably herein to refer to the same device.

Microprocessor chip performance will increasingly be limited by power dissipation as the scaling of the technology results in unacceptable power density increases. This power dissipation is increasingly due to leakage current that is independent of whether or not a given circuit is active. Thus, inactive hardware elements that are powered-on will dissipate essentially as much power as if they were active.

The various hardware elements included in a single microprocessor chip receive power that is distributed throughout the microprocessor chip. One method for distributing power is to provide a power plane within the microprocessor chip. The hardware elements in the microprocessor chip receive power from the power plane.

The trend in the industry has been to continually increase the density of the circuitry in the microprocessor chip which increases the number of hardware elements that are included in a single microprocessor chip. Thus, many hardware elements will be integrated within one single microprocessor chip.

Depending on the particular work being done by the chip, some of the hardware elements will be required while others are not used. In some cases, a significant number of the hardware elements may not be needed during a particular period of time. In other cases, limitations in the power supply infrastructure or limitations in the microprocessor cooling system will not allow all the elements of a single microprocessor chip to be active simultaneously. This is particularly true during the typical function testing of unpackaged chips, or testing used to increase microprocessor hardware reliability. Reliability testing is done under conditions of elevated temperature and elevated voltage and therefore causes the microprocessor chip to dissipate peak power. The current generation of testing equipment will be unable to supply the required power to test the next generation of highly integrated microprocessors which contain large numbers of hardware elements.

Permitting unused hardware elements to remain powered-on, or powered-on in an idle state during normal operations, will also require the chip to dissipate unnecessary power. Therefore, a need exists for a method, system, and product for dynamically managing power in a microprocessor chip by selectively altering the present power state of individual hardware elements included in the microprocessor chip according to the present processing demands placed on the microprocessor chip.

SUMMARY OF THE INVENTION

A method, system, and computer program product are disclosed for dynamically managing power in a microprocessor chip that includes physical hardware elements within the microprocessor chip. The power state of each hardware element in the microprocessor chip is controlled independently from the power state of the other hardware elements included in the microprocessor chip. For example, power can be simultaneously turned-on for one hardware element in the microprocessor chip and turned off for all other hardware elements in that same microprocessor chip.

This invention employs a hypervisor, which is a software or firmware component that dynamically dispatches virtual processors to physical processors. When the hypervisor selects a virtual processor to be executed for an interval of time (a “time slice”), it will know which hardware elements are necessary to execute the virtual processor, and it will therefore dynamically alter the present power state of the hardware elements within the microprocessor chip such that only the necessary elements are powered-on for the next time slice.

In addition, the power to the various hardware sub-elements that are included within a single processing core may also be controlled independently from the power state of all other hardware sub-elements in that processing core. Thus, when a processing core includes several load/store units, for example, and only one load/store unit is required, power to the second load/store unit may be turned off while the power to the rest of the hardware sub-elements in the processing core remains turned on.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

A preferred embodiment of the present invention and its advantages are better understood by referring to the figures, like numerals being used for like and corresponding parts of the accompanying figures.

The present invention is a method, system, and product for dynamically managing power in a microprocessor chip by selectively altering the power state of individual hardware circuit elements and sub-elements according to the present processing demands placed on the microprocessor chip. A plurality of different hardware elements is included within the microprocessor chip. The power to each individual hardware element in a microprocessor chip may be controlled separately from all of the other hardware elements in the microprocessor chip. In addition, the power to some sub-elements of a processing core may also be controlled separately from the other sub-elements of the core. Thus, the power state of each hardware element and sub-element may be individually and separately controlled.

A determination is made at particular intervals of time as to whether the present power state of individual hardware elements or sub-elements should be altered. If a determination is made that the power state to an individual hardware element or sub-element should be altered, the power state is altered.

Selected hardware elements and sub-elements are powered-on if they were not already powered-on. Hardware elements and sub-elements that had been powered-on to execute a previous process but that are not necessary to execute the current process are then powered-off. Thus, necessary hardware elements and sub-elements are turned on and unnecessary hardware elements and sub-elements are turned off.

Some hardware elements are dedicated to and used exclusively by a physical processing core. Other hardware elements are shared by more than one processing cores. When a hardware element is shared, it is not used exclusively by just one physical processing core. According to the present invention, when the power state of a processing core is altered, the power state of hardware elements that are dedicated to that processing core are also altered in a similar manner. Thus, if the power to a particular processing core is to be turned completely off, the power to all hardware elements that are dedicated to that particular processing core will also be turned completely off. Power to hardware elements that are shared with other processing cores is not altered unless the number of active cores that require that shared element transitions to or from zero. That is, the hypervisor keeps track of which cores are running virtual processors that need a given shared element, and will only keep the shared element powered-on if an active core needs it.

A determination is made as to whether to alter the power state of a hardware element or sub-element at the time that hardware elements and sub-elements are assigned to a virtual server. Therefore, the power states of the various hardware elements and sub-elements in a microprocessor chip can change at particular intervals of time. According to the preferred embodiment, this interval of time occurs when a virtual processor is dispatched to the physical processor and its associated hardware elements. A virtual processor is dispatched when particular hardware elements and sub-elements are selected to be used to implement the virtual processor.

A virtual processor specifies a processing core, sub-elements that are necessary within that core, and any hardware elements that are part of the microprocessor chip that are necessary. These hardware elements and sub-elements may be required to be dedicated to the processing core or they may be shared with other processing cores.

Thus, for example, a virtual processor may require a processing core, one load/store unit within that core, and one encryption unit. When that virtual processor is dispatched, a particular processing core within a particular microprocessor chip is selected by the hypervisor. If the processing core includes two or more load/store units, one is selected. If the microprocessor chip includes several encryption units, one is selected. Thus, when a virtual processor is dispatched, a processing core and all necessary hardware elements and sub-elements that are needed for that virtual processor are also selected. These necessary hardware elements may be dedicated to this particular processing core, or they may be shared with other processing cores.

The present invention is implemented using a hypervisor which is responsible for implementing the virtual servers in a data processing system, including managing the time-sharing of physical processors among many different virtual processors. The hypervisor dynamically assigns each virtual processor to a physical processor and its associated hardware elements, which will then be used to execute the virtual processor. The hypervisor sets a time limit when a virtual processor is assigned to a physical processor. The physical processor then executes the virtual processor until the time limit expires. When the time limit, also called a time slice, expires, control of the physical processor reverts back to the hypervisor which then selects the next virtual processor to be assigned, or dispatched, to this physical processor.

As used herein, the term “physical processor” refers to a processing core and may include other hardware elements that are either dedicated to that core or shared by multiple cores. Thus, a physical processor is a processing core and hardware elements that are either dedicated to or shared by that processing core.

In the environment of the present invention, a virtual processor is selected by the hypervisor to next be executed or “dispatched”. When a virtual processor is dispatched to a particular physical processor, hardware elements of the physical processor are selected which will be used to execute the virtual processor. These selected hardware elements of the particular physical processor are then powered-on and the remaining unnecessary hardware elements in the microprocessor chip are powered-off. In addition, hardware sub-elements in a single core are selected. These selected hardware sub-elements are powered-on. Any unnecessary hardware sub-elements in that core are powered-off.

When the hypervisor dispatches a virtual processor, it loads the registers that are needed by the virtual processor from an area in memory, called a virtual processor state descriptor, where they were saved when the virtual processor was last undispatched. The virtual processor state descriptor also tells the hypervisor which physical processor hardware elements, and which hardware sub-elements in the core, are required by that virtual processor. In this manner, the hypervisor knows at dispatch time which hardware elements and hardware sub-elements are necessary in order to execute the virtual processor.

The information in the virtual processor state descriptor regarding which hardware elements and sub-elements will be needed can be established in several ways, including (1) having the values specified manually at the time that a virtual server and its virtual processors are defined or (2) through a dynamic discovery process where the requirement for a hardware element or sub-element is discovered and recorded by the hypervisor on the first instance of use by the virtual processor, the discovery being communicated to the hypervisor through a hardware interruption or trap event.

According to the present invention, the power states of the hardware elements and sub-elements are dynamically controlled at a time-slice level. Each time-slice level is the particular interval of time described above. After the expiration of each time-slice, the hypervisor can dynamically alter the power state of any, all, or some of the hardware elements or sub-elements in a microprocessor chip.

The time slice interval, the period between successive dispatching operations to physical hardware elements and sub-elements, is typically on the order of a millisecond. The time required to power a hardware element or sub-element on or off is much shorter, perhaps only 50 nanoseconds. Also, the changing of power states for multiple hardware elements and sub-elements can generally be done concurrently, and also may be overlapped in part with other work that the hypervisor must do in dispatching a new virtual processor. Thus, the performance impact of altering power states is very small.

The hypervisor is aware of the current state of the system and thus knows which hardware elements and sub-elements are currently in use, i.e. which hardware elements and sub-elements are currently powered-on and which are currently powered-off. In addition, the hypervisor knows which hardware elements and sub-elements had been used by the virtual processor which just completed its processing. Therefore, the hypervisor knows which hardware elements and sub-elements are currently powered-on but are no longer needed. The hypervisor maintains this knowledge preferably through a profile of hardware elements and sub-elements. The profile can be created either through a definition process and/or through a discovery process in which the first use of a hardware element by a virtual processor causes the hardware element to be added to the virtual processor's profile.

The individual power controls for the hardware elements and sub-elements are logically aggregated and accessed through a centralized control register included in each microprocessor chip which specifies whether the power being received by each particular hardware element and sub-element is full power, or no power including neither active nor leakage power. The contents of this centralized control register can be modified by signals generated either internally or externally to the microprocessor chip. Alternative embodiments could include low power states other than fully off, depending in part upon the specific technology.

When an element or sub-element is powered off according to the preferred embodiment, it receives neither active nor leakage power. Thus, according to the preferred embodiment, unnecessary elements and sub-elements are powered-off and are not just idled in a state where they receive low power.

When the power for an element is switched on, the preferred embodiment requires that the element initialize itself to a suitable state to begin operation. Therefore, each hardware element will preferably include a storage device within which may be stored state information. In another embodiment, instead of providing a storage device in each hardware element, the element may retain some or all of its state from the last time it was powered on by using a small amount of circuitry that would remain powered on either fully or in a low power state regardless of the power state of the rest of that hardware element.

The present invention can be used to optimize the hardware element power control to achieve different goals and deal with different constraints. For example, if the hypervisor turns off hardware elements and sub-elements when they are not in actual use, the net effect would be for the power consumption of the microprocessor chip to approximately track the resource utilization level for that chip.

Another example would take advantage of the fact that the hypervisor controls the selection of physical processing cores that will execute the virtual processors. Specific constraints could be avoided by controlling which physical processing cores are selected to execute virtual processors. The hypervisor could reduce the processing to be done by a specific microprocessor chip or specific hardware elements within a single microprocessor chip by forcing more idle time or by assigning less demanding work to hardware resources that are approaching or reaching their specified power limits.

The present invention provides many advantages over the prior art. The following are examples of environments within which the present invention will reduce the power consumption of a microprocessor chip: an environment where variable workloads need multiple processing cores during peak periods but only one processing core during average periods, an environment where workloads need fewer cores than are available on an microprocessor chip in order to achieve balanced processor-to-memory performance (e.g., high performance computing applications that are memory bandwidth limited and cannot effectively use all the cores that were placed on the chip for full use by commercial workloads), an environment where commercial workloads have no use for on-chip vector/streaming engines, and an environment where workloads have no use for on-chip encryption or protocol processing engines.

The present invention also provides other advantages. The average power consumption and heat dissipation for microprocessor chips can be reduced by an amount that is roughly proportional to their average capacity utilization. The present invention can be used to dynamically balance power among many different microprocessor chips in a system.

The present invention can be used to limit the power dissipation of microprocessor chips during testing of the chips which causes the individual hardware elements to reach peak power. For example, the present invention can be used during reliability testing of a microprocessor chip involving elevated temperature and elevated voltage of the chip and that causes the microprocessor chip to dissipate peak power.

FIG. 1is a block diagram of a data processing system100, including a hypervisor, in which the present invention may be implemented. System100is preferably a symmetric multiprocessing (SMP) server computer system. SMP server computer system100includes physical hardware devices that can be mapped to, i.e. temporarily owned by, a user application to execute that application.

SMP server computer system100includes a physical SMP server102. Physical SMP server102includes physical hardware devices such as processors104, memory106, and I/O adapters108. These physical devices are managed by hypervisor110.

A virtual server is a proxy for a physical server that has the same capabilities, interfaces, and state. Virtual servers are created and managed by a hypervisor that resides on physical SMP server computer system100. A virtual server appears to be a physical SMP server to its user: the operating system, middleware, and application software that run upon it. SMP server computer system100includes one or more virtual servers such as virtual server112and virtual server112a.

Each virtual server appears to its software to include its own processor(s), memory, and I/O adapter(s) that are available for the exclusive use of that virtual server. For example, virtual server112includes a virtual processor120, virtual memory122, and virtual I/O adapters124. Virtual server112aincludes virtual processors120a, virtual memory122a, and virtual I/O adapters124a.

Each virtual server supports its own software environment, including an operating system, middleware, and applications. The software environment of each virtual server can be different from the software environment of other virtual. For example, the operating systems executed by each virtual server may differ from one another.

For example, virtual server112supports operating system114, middleware116, and applications118. Virtual server112asupports operating system114a, middleware116a, and applications118a. Operating systems114and114amay be the same or different operating systems.

A virtual server is a logical description of a server that defines a server environment that acts, to a user, as if it were a physical server, being accessed and providing information in the same way as a physical server. The virtual processors, virtual memory, and virtual I/O adapters that are defined for each virtual server are logical substitutes for physical processors, memory, and I/O adapters.

Hypervisor110manages the mapping between the virtual servers with their virtual processors, virtual memory, and virtual I/O adapters and the physical hardware devices that are selected to implement these virtual devices. For example, when a virtual processor is dispatched, a physical processor, such as one of physical processors104, is selected by hypervisor110to be used to execute and implement that virtual processor. Hypervisor110manages the selections of physical devices and their temporary assignment to virtual devices.

Hypervisor110is responsible for dynamically creating, managing, and destroying virtual SMP servers. Whole virtual processors, virtual I/O adapters, and virtual memory blocks can be removed or added by hypervisor110. Hypervisor110is also responsible for dynamical resource allocation, managing time-sharing of physical resources, and altering the physical resource mapped to a processor without involving the operating system. Hypervisor110is also able to dedicate physical resources to virtual resources for situations where sharing is not desired. Hypervisor110is responsible for managing the addition or removal of physical resources. Hypervisor110makes these additions and deletions transparent to the upper level applications.

FIG. 2is a block diagram of an example of a microprocessor chip200that within it includes multiple different hardware elements in accordance with the present invention.

Microprocessor chip200includes a processing core202, a processing core204, an L2 cache206, an L3 cache directory and control212, a compression unit214, an encryption unit216, encryption unit217, and a power control unit218. Processing core202, processing core204, L2 cache206, L3 cache directory and control212, compression unit214, encryption unit216, and power control unit218are hardware elements.

Each hardware element may also include hardware—sub-elements. For example, processing core202includes hardware sub-elements: floating point unit (FPU1)220, floating point unit (FPU2)222, instruction sequencing unit (ISU)224, fixed point unit (FXU)226, instruction fetch unit/branch execution unit (IFU, BXU)228, load/store unit (LSU1)232, and load/store unit (LSU2)234. The power to each hardware element and each hardware sub-element can be controlled separately and independently from the other hardware elements and hardware sub-elements. Other processing cores, such as processing core204, may also include these or other sub-elements where the power to each sub-element can be controlled separately from all other hardware elements and sub-elements.

Microprocessor chip200includes power control unit218. Power control unit218includes a control register236. Control register236includes a bit for each hardware element and each hardware sub-element. Thus, control register236includes a bit for FPU1220, a bit for FPU2222, a bit for ISU224, a bit for FXU226, a bit for IFU/BXU228, a bit for LSU1232, and a bit for LSU2234. Control register236also includes a bit for L2 cache206, a bit for L3 directory and control212, a bit for compression unit214, and a bit for encryption unit216.

Thus, the power to each one of the hardware elements and hardware sub-elements may be controlled utilizing control register236by setting and clearing the bits in control register236. For example, each hardware element and hardware sub-element that has its bit set will be powered-on, and each hardware element and hardware sub-element that has its bit cleared will be powered-off.

Hypervisor110will control the power to each hardware element and sub-element using control register236. Hypervisor110will set and clear bits as appropriate in order to selectively power each individual hardware elements and sub-element.

The power to each hardware sub-element in a processing core may be controlled independently from the power to the other sub-elements in that core. In addition, power to the entire processor core may be controlled. For example, control register236may also include a bit for processing core202and a bit for processing core204. Thus, a signal244may be used to turn the power either on or off for the entire processing core202. A signal246may be used to turn the power either on or off for the entire processing core204. Signals244and246, when indicating that power should be turned off, override the signals to the individual sub-elements in that core. In this manner, power to all sub-elements in processing core202is turned off when the bit in control register236that is coupled to signal244is cleared. When the bit in control register236that is coupled to signal244is set, power to each sub-element in processing core202is controlled individually by the bits in control register236as described above.

Power is provided in a microprocessor chip typically through the use of a power plane. Each hardware element and sub-element will typically receive power at many different locations within the element. There may be as many as hundreds of locations within an element where power is provided. According to the present invention, power control236is coupled to an element's power distribution.

For example, L2 cache206includes a power distribution mechanism238. Power distribution mechanism238is meant to depict all of the locations within element206where power is provided. For simplicity, only one block238is depicted. Those skilled in the art will recognize, however, that block238includes hundreds or even thousands of locations within element206where power is provided from a power plane (not shown) in microprocessor chip200.

In order to control power to element206, a signal240is provided from power control218to element206. Signal240is distributed throughout element206to each location within element206where power is provided. Signal240is used to control whether the power is turned-on or turned-off. For example, a transistor may be provided at each location where power is received from the power plane. Signal240could then be used to turn the transistor either on or off which in turn will control whether power is being received or whether it is not being received at that location. Those skilled in the art will also recognize that other mechanisms could be used to distribute power and to control whether that power is being received within an element.

Signal240is depicted as being received within power distribution mechanism238. This should be understood to illustrate signal240being distributed throughout mechanism238to each location where power is provided to element206.

Each hardware element may also include a storage device. For example, L2 cache206includes storage242. Storage242may be used to store state information for element206prior to element206being powered-off. Storage242may also be used to store default state information or initialization information for the element. In this manner, when element206is powered back on after being powered-off, element206may be used immediately without the need for initializing element206. The stored state or initialization information could be recovered for and loaded into an element from that element's storage device so that the element may be used immediately after being powered-on.

For example, at the beginning of the next time period, or time slice, the hypervisor can select a virtual processor which requires a processing core having one floating point unit, one load/store unit, and one encryption unit. After this virtual processor is selected, the hypervisor selects a physical processing core that will be used to execute this virtual processor. The hypervisor may select, for example, processing core202having FPU1220, ISU224, FXU226, IFU/BXU238, LSU1232, and encryption unit217. Assume that FPU1220, FPU2222, ISU224, FXU226, IFU/BXU238, LSU1232, and LSU2234are currently all powered-on. Just prior to dispatching the virtual processor to these elements and sub-elements so they can begin executing the virtual processor, hypervisor will access control register236to set the bits for FPU1220, ISU224, FXU226, IFU/BXU238, and LSU1232, encryption unit217, and L2 cache206, and clear the bits for FPU2222and LSU2234, and for encryption unit216. Control register236then generates the appropriate signal for each element and sub-element that indicates whether the associated bit is set or cleared. The signal generated by control register236for an element or sub-element is then distributed throughout that element or sub-element in order to either permit power to be received or turn power off to that element or sub-element. Thus, power remains turned on for FPU1220, ISU224, FXU226, IFU/BXU238, and LSU1232. Power to FPU2222and LSU2234is turned off. Power to encryption unit217is also turned on while power to encryption unit216remains turned off.

FIG. 3depicts a high level flow chart which illustrates dynamically managing power within a microprocessor chip when a hardware element, such as a processing core, included in the microprocessor chip becomes available due to a first event in accordance with the present invention. The process starts as depicted by block300and thereafter passes to block302which illustrates a virtual processor's time slice ending on a particular physical processing core. Next, block304depicts the hypervisor saving the current state of the virtual processor that is assigned to the particular physical processor into the virtual processor's memory area. Block306, then, illustrates the hypervisor looking in its queues of ready-to-run virtual processors and selecting the next virtual processor from the queue. The choice of which virtual processor to run next can be based on any of several different algorithms. For example, the choice of virtual processor could be based on a round-robin algorithm. More commonly it would be based on a priority scheme in which the virtual processors are given weights which determine the share of the physical processor resources they should receive.

The process then passes to block308which depicts a determination of whether or not the virtual processor that was selected is the same as the virtual processor that last ran on this particular physical processor. If the selected virtual processor to be dispatched to a particular physical processor is the same as the one that last ran on the particular physical processor, then most of the virtual processor state and all of the control information is already set and need not be reloaded. Therefore, if a determination is made that the selected virtual processor is the same as the last virtual processor that ran on this particular physical processor, the process passes back to block302.

Referring again to block308, if a determination is made that the selected virtual processor is not the same as the last virtual processor that ran on this particular physical processor, the process passes to block310which illustrates the hypervisor loading registers for the selected virtual processor and setting a time slice counter.

The process then passes to block312which depicts the hypervisor getting control information for the selected virtual processor. The control information indicates which hardware elements and sub-elements are required by the selected virtual processor. Next, block314illustrates the hypervisor comparing the current power state for the hardware elements and sub-elements to the power state for the necessary hardware elements and sub-elements that are needed by the selected virtual processor. Even if the next virtual processor is different from the last virtual processor, if the next virtual processor requires the same hardware elements and sub-elements as the prior virtual processor, those hardware elements and sub-elements can remain powered-on and can be used for the next virtual processor. In this manner, the hardware element power control information is correct and need not be reloaded saving the time required by a reload. Thus, the control register is correct for the next time-slice and does not need to be updated.

Thereafter, block316depicts the hypervisor turning off unnecessary elements and sub-elements that are currently on and turning on necessary elements and sub-elements that are currently off. The process then passes back to block302.

When a virtual processor is dispatched to a physical processor that has just been powered on, in the preferred embodiment, the loading of that virtual processors state would generally be done by the newly powered on physical processor as its initial action.

FIG. 4illustrates a high level flow chart which depicts dynamically managing power within a microprocessor chip when a hardware element, such as a processing core, included in the microprocessor chip becomes available due to a second event in accordance with the present invention. The process starts as depicted by block400and thereafter passes to block402which illustrates a virtual processor yielding to the hypervisor the remainder of that virtual processor's unexpired time slice that was allocated to the virtual processor to use a particular processing core.

Next, block404depicts a determination by the hypervisor of whether to run another virtual processor in the yielded time on that physical processor. If a determination is made by the hypervisor to run another virtual processor in the yielded time, the process passes back to block308depicted inFIG. 3. Referring again to block404, illustrated inFIG. 4, if a determination is made by the hypervisor not to run another virtual processor in the yielded time, the process passes to block406which depicts a determination of whether the particular processing core is the last processing core in the system. If a determination is made that the particular physical processing core is the last processing core in the system, the process passes back to block302depicted inFIG. 3.

Referring again to block406inFIG. 4, if a determination is made that the particular physical processing core is not the last physical processing core in the system, the process passes to block408which illustrates the hypervisor turning off power to this particular physical processing core and the physical processing core's dedicated hardware elements. A physical processing core may have one or more hardware elements that are dedicated to and used exclusively by the physical processing core. In addition, a physical processing core may share one or more hardware elements with another physical processing core. When a hardware element is shared, it is not used exclusively by just one physical processing core. For example, an microprocessor chip could include two encryption engines. A virtual processor may require only one encryption engine. In this case, one of the encryption engines may be dedicated to the exclusive use of one processing core, while the remaining encryption engine is shared among the remaining processing cores in that microprocessor chip.

Block410, then, depicts a determination of whether or not the particular physical processing core uses any shared hardware elements. If a determination is made that the physical processing core does not use any shared hardware elements, the process passes back to block302depicted inFIG. 3. Referring again to block410, if a determination is made that the physical processing core does use one or more hardware elements that it shares with another processing core, the process passes to block412which illustrates a determination of whether or not the shared hardware element is currently being used by another processing core.

If a determination is made that the shared hardware element is not currently being used by another processing core, the process passes to block414which depicts the hypervisor turning off power to the shared hardware elements that are not currently being used by another physical processing core. The process then passes back to block302depicted inFIG. 3. Referring again to block412inFIG. 4, if a determination is made that the shared hardware element is currently being used by another physical processing core, the process passes back to block302depicted inFIG. 3.

FIG. 5depicts a high level flow chart which illustrates dynamically managing power within a microprocessor chip when the total utilization of the hardware elements included in the microprocessor chip has exceeded a predetermined threshold in accordance with the present invention. The process starts as depicted by block500and thereafter passes to block502which illustrates the hypervisor comparing the current utilization of all physical hardware elements in the microprocessor chip to a predetermined threshold value. Any suitable threshold value may be used, and any suitable method may be used to set the threshold value.

Next, block504depicts a determination of whether or not the current average processor utilization is greater than the threshold. If a determination is made that the current utilization is not greater than the threshold, the process passes back to block502. Referring again to block504, if a determination is made that the current utilization is greater than the threshold, the process passes to block506which illustrates a determination of whether or not there are any physical processing cores that are currently powered-off. If a determination is made that there are no physical processing core that are currently powered off, the process passes back to block502.

Referring again to block506, if a determination is made that there is at least one physical processing core that is currently powered-off, the process passes to block508which illustrates the hypervisor selecting a powered-off physical processing core to power-on. Next, block510depicts the hypervisor turning on full power to the selected physical processing core and its dedicated hardware elements. The newly powered-on physical processing core and its dedicated hardware elements are then pointed at the queues of ready-to-run virtual processors. The process then passes back to block502.

Those of ordinary skill in the art will also appreciate that the current invention can be used during the function or reliability testing of microprocessors to limit the peak power consumed by the microprocessor under test. Although the preferred embodiment uses a hypervisor to direct the setting of control register236, it should be understood that suitable microprocessor hardware could be provided to allow testing equipment to manipulate the control register directly.