# US 9,436,505 B2 · Power management for host with devices assigned to virtual machines

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 9,436,505 B2
- Document ID: US9436505B2
- Status: Granted
- Kind: B2
- Application number: 13/773,755
- Filed: 2013-02-22
- Published: 2014-08-28
- Granted: 2016-09-06
- Earliest claimed: 2013-02-22
- Assignees: Red Hat Israel, Ltd.
- Applicants: Red Hat Israel,Ltd.
- Inventors: Michael Tsirkin; Alex Williamson
- Web page: https://patentgrep.com/patent/US9436505B2

## CPC

- G06F 9/4881: {Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues}
- G06F 1/3287: by switching off individual functional units in the computer system
- G06F 9/45558: {Hypervisor-specific management and integration aspects}
- G06F 9/461: {Saving or restoring of program or task context}
- G06F 9/4893: {taking into account power or heat criteria (power management in computers in general G06F1/3203; thermal management in computers in general G06F1/206)}
- Y02D 10/00: Energy efficient computing, e.g. low power processors, power management or thermal management
- Y02D 30/50: in wire-line communication networks, e.g. low power modes or reduced link rate
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- Y02D: CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE

## Abstract

A system and method of removing power from a device assigned to a virtual machine running on a host machine includes receiving a request, by a notification module, from the virtual machine to remove power from the device, and receiving, by the notification module, an indication from the virtual machine that a condition has been satisfied; managing an execution priority for requests, by a task module, where the task module schedules the request to be executed after the notification module receives the indication that the condition has been satisfied; and in response to execution of the request, by a power down module, sending a communication to the host machine to cause the host machine to remove power from the device.

## Claims

### Claim 1

A system for removing power from a device assigned to a virtual machine running on a host machine, the system comprising:
a notification module that receives a request from a virtual machine running on a host machine to remove power from a device assigned to the virtual machine, and receives an indication that first state information of the device has been saved to memory, wherein the virtual machine runs a guest operating system, and the first state information is maintained by the virtual machine;
a task module that manages an execution priority for requests, wherein the task module schedules the request to be executed after the notification module receives the indication; and
a power down module that, in response to execution of the request, sends a communication to the host machine to cause the host machine to remove power from the device.

### Claim 2 (depends on 1)

The system of claim 1, wherein the host machine, in response to the communication, removes power from the device.

### Claim 3 (depends on 2)

The system of claim 2, wherein the virtual machine includes a state module that saves the first state information of the device to the memory, and wherein the virtual machine stops using the device and the state module saves the first state information to the memory before the request is executed.

### Claim 4 (depends on 3)

The system of claim 3, further comprising:
a second notification module that communicates with the host machine and that receives a second indication that power has been restored to the device assigned to the virtual machine,
wherein the first notification module, in response to the second indication that power has been restored to the device, notifies the virtual machine that the assigned device is available, and
the notification to the virtual machine causes the state module to restore the saved first state information maintained by the virtual machine.

### Claim 5 (depends on 4)

The system of claim 4, wherein the virtual machine resumes using the device after the saved first state information has been restored.

### Claim 6 (depends on 5)

The system of claim 5, wherein the first notification module sends a second communication to the virtual machine to cause the virtual machine to suspend and further to cause the virtual machine to send the request to remove power from the device, and the virtual machine is suspended before the request is executed.

### Claim 7 (depends on 6)

The system of claim 6, further comprising:
a second state module that saves second state information of the device assigned to the virtual machine, wherein the second state information is maintained by the host machine, and wherein the first state information maintained by the virtual machine is different from the second state information maintained by the host machine.

### Claim 8 (depends on 7)

The system of claim 7, wherein the second notification module
receives a third indication that the host machine will be suspended,
the first notification module, in response to the second notification module receiving the third indication that the host machine will be suspended, sends the second communication to the virtual machine to cause the virtual machine to suspend,
the task module schedules one or more instructions to suspend the host machine to be executed after removal of power from the device, and
the power down module, in response to the removal of power from the device, sends a third communication to the host machine to cause the host machine to suspend.

### Claim 9 (depends on 8)

The system of claim 8, wherein the second notification module receives the third indication that the host machine will be suspended in response to a user request.

### Claim 10 (depends on 8)

The system of claim 8, wherein the host machine, in response to the third communication, suspends.

### Claim 11 (depends on 7)

The system of claim 7, wherein the second state module, in response to the second notification module receiving the second indication that power has been restored to the device, restores the saved second state information maintained by the host machine, and the second state module restores the saved second state information maintained by the host machine before the first state module restores the saved first state information maintained by the virtual machine.

### Claim 12 (depends on 1)

The system of claim 1, further comprising:
a hypervisor including a second state module that saves second state information of the device assigned to the virtual machine, wherein the second state information is maintained by the host machine, the first state information maintained by the virtual machine is different from the second state information maintained by the host machine, and the first state information is not maintained by the hypervisor.

### Claim 13 (depends on 1)

The system of claim 1, wherein the host machine removes power from the first device without removing power from a second device assigned to the virtual machine.

### Claim 14

A method of removing power from a device, the method comprising:
receiving a request from a virtual machine to remove power from a device assigned to the virtual machine, wherein the virtual machine runs on a host machine and runs a guest operating system;
scheduling the request to remove power from the device to be executed after receiving an indication that first state information of the device has been saved to a memory, the first state information maintained by the virtual machine;
receiving the indication from the virtual machine that the first state information of the device has been saved to the memory; and
after the request has been satisfied, sending a communication to the host machine to cause the host machine to remove power from the device.

### Claim 15 (depends on 14)

The method of claim 14, further comprising determining that power has been removed from the device.

### Claim 16 (depends on 15)

The method of claim 15, further comprising:
sending a communication to the virtual machine to cause the virtual machine to stop using the device and to further cause the virtual machine to save the first state information of the device assigned to the virtual machine to the memory;
wherein the first state information is saved to the memory before the request is executed.

### Claim 17 (depends on 16)

The method of claim 16, further comprising:
receiving an indication that power has been restored to the device; and
in response to the indication that power has been restored to the device, notifying the virtual machine that the assigned device is available,
wherein the notification to the virtual machine causes the virtual machine to restore the saved first state information maintained by the virtual machine.

### Claim 18 (depends on 17)

The method of claim 17, further comprising:
receiving an indication that the host machine will be suspended;
scheduling one or more instructions, to suspend the host machine, to be executed after removal of power from the device;
in response to the receiving the indication that the host machine will be suspended, sending a second communication to the virtual machine to cause the virtual machine to suspend;
in response to receiving the indication that the first state information of the device has been saved to the memory, saving second state information maintained by the host machine, the second state information being associated with the device and being different from the first state information; and
in response to the removal of power from the device, sending a third communication to the host machine to cause the host machine to suspend.

### Claim 19

A non-transitory machine-readable medium comprising a first plurality of machine-readable instructions that executed by one or more processors are adapted to cause the one or more processors to perform a method comprising:
receiving an indication that a host machine will be suspended;
scheduling one or more instructions, to suspend the host machine, to be executed after removal of power from a device assigned to a virtual machine, wherein the virtual machine runs on the host machine and runs a guest operating system;
responsive to receiving the indication that the host machine will be suspended, sending a first communication to the virtual machine to cause the virtual machine to stop using the device, to further cause the virtual machine to save first state information maintained by the virtual machine to memory, and to further cause the virtual machine to suspend, wherein the first state information is associated with the device;
receiving an indication that the virtual machine has been suspended;
responsive to receiving the indication that the virtual machine has been suspended, saving second state information maintained by the host machine to memory, wherein the second state information is associated with the device;
after saving the second state information, sending a second communication to the host machine to cause the host machine to remove power from the device;
determining that power has been removed from the device; and
responsive to the removal of power from the device, sending a third communication to the host machine to cause the host machine to suspend.

### Claim 20 (depends on 19)

The non-transitory machine-readable medium of claim 19, further comprising a second plurality of machine-readable instructions that when executed by one or more processors are adapted to cause the one or more processors to perform a method comprising:
receiving an indication that power has been restored to the device;
restoring the saved second state information maintained by the host machine; and
after the restoring, notifying the virtual machine that the assigned device is available, wherein the notification causes the virtual machine to restore the first saved state information maintained by the virtual machine.
