# US 2024/0202018 A1 · Facilitating Power Management of a Hardware Device by a Virtual Machine

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

- Number: US 2024/0202018 A1
- Document ID: US20240202018A1
- Status: Published application
- Kind: A1
- Application number: 18/080,841
- Filed: 2022-12-14
- Published: 2024-06-20
- Earliest claimed: 2022-12-14
- Assignees: Red Hat, Inc.
- Applicants: Red Hat, Inc.
- Inventors: Bandan Das
- Web page: https://patentgrep.com/patent/US20240202018A1

## CPC

- G06F 9/45558: {Hypervisor-specific management and integration aspects}
- G06F 1/28: Supervision thereof, e.g. detecting power-supply failure by out of limits supervision
- G06F 2009/4557: {Distribution of virtual machine instances; Migration and load balancing}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Some examples can enable secure and efficient power management of a target hardware device by a virtual machine. For example, a first hypervisor supporting a first virtual machine can receive a first request from the first virtual machine. The first request can indicate a target power mode for the target hardware device assigned to the first virtual machine. In response to receiving the first request, the first hypervisor can transmit a second request indicating the target power mode for the target hardware device to a second hypervisor. The second hypervisor can forward the second request to a second virtual machine, and the second virtual machine can cause the target hardware device to enter the target power mode in response to receiving the second request.

## Claims

### Claim 1

A system comprising:
a processor; and
a memory that includes instructions executable by the processor for causing the processor to perform operations comprising:
receiving, by a first hypervisor supporting a first virtual machine, a first request from the first virtual machine indicating a target power mode for a target hardware device assigned to the first virtual machine; and
in response to receiving the first request, transmitting, by the first hypervisor, a second request indicating the target power mode for the target hardware device to a second hypervisor, the second hypervisor being configured to forward the second request to a second virtual machine, the second virtual machine being configured to cause the target hardware device to enter the target power mode in response to receiving the second request.

### Claim 2 (depends on 1)

The system of claim 1, wherein the first request is a first virtual machine (VM) call executed by the first virtual machine to cause a VM exit to the first hypervisor.

### Claim 3 (depends on 2)

The system of claim 2, wherein the second request is a second VM call executed by the first hypervisor to interface with the second hypervisor.

### Claim 4 (depends on 3)

The system of claim 3, wherein the second VM call is configured to trigger a system management interrupt that enables the processor to enter a system management mode, and wherein the second hypervisor and the second virtual machine are configured to execute within a privileged context of the system management mode.

### Claim 5 (depends on 1)

The system of claim 1, wherein the first request comprises a first power-mode identifier indicating the target power mode for the target hardware device.

### Claim 6 (depends on 5)

The system of claim 5, wherein the first hypervisor is configured to:
generate a mapping table that correlates a first set of power-mode identifiers to a second set of power-mode identifiers, the second set of power-mode identifiers being different from the first set of power-mode identifiers;
extract, from the first request, the first power-mode identifier associated with the target power mode, the first power-mode identifier being in the first set of power-mode identifiers;
determine a second power-mode identifier that corresponds to the first power-mode identifier in the mapping table, the second power-mode identifier being in the second set of power-mode identifiers; and
include the second power-mode identifier in the second request transmitted to the second hypervisor, the second hypervisor being configured to identify the target power mode based on the second power-mode identifier.

### Claim 7 (depends on 1)

The system of claim 1, wherein the second hypervisor is configured to:
validate the second request; and
in response to determining that the second request is valid, forward the second request to the second virtual machine for causing the second virtual machine to execute a software function configured to cause the target hardware device to enter the target power mode.

### Claim 8

A method comprising:
receiving, by a first hypervisor supporting a first virtual machine, a first request from the first virtual machine indicating a target power mode for a target hardware device assigned to the first virtual machine; and
in response to receiving the first request, transmitting, by the first hypervisor, a second request indicating the target power mode for the target hardware device to a second hypervisor, the second hypervisor being configured to forward the second request to a second virtual machine, the second virtual machine being configured to cause the target hardware device to enter the target power mode in response to receiving the second request.

### Claim 9 (depends on 8)

The method of claim 8, wherein the first request is a first virtual machine (VM) call executed by the first virtual machine to cause a first VM exit to the first hypervisor.

### Claim 10 (depends on 9)

The method of claim 9, wherein the second request is a second VM call executed by the first hypervisor to interface with the second hypervisor.

### Claim 11 (depends on 10)

The method of claim 10, wherein the second VM call is configured to trigger a system management interrupt that enables a processor to enter a system management mode, and wherein the second hypervisor and the second virtual machine are configured to execute within a privileged context of the system management mode.

### Claim 12 (depends on 8)

The method of claim 8, wherein the first request further comprises a first power-mode identifier indicating the target power mode for the target hardware device.

### Claim 13 (depends on 12)

The method of claim 12, wherein the first hypervisor is configured to:
generate a mapping table that correlates a first set of power-mode identifiers to a second set of power-mode identifiers, the second set of power-mode identifiers being different from the first set of power-mode identifiers;
extract, from the first request, the first power-mode identifier associated with the target power mode, the first power-mode identifier being in the first set of power-mode identifiers;
determine a second power-mode identifier that corresponds to the first power-mode identifier in the mapping table, the second power-mode identifier being in the second set of power-mode identifiers; and
include the second power-mode identifier in the second request transmitted to the second hypervisor, the second hypervisor being configured to identify the target power mode based on the second power-mode identifier.

### Claim 14 (depends on 8)

The method of claim 8, wherein the second hypervisor is configured to:
validate the second request; and
in response to determining that the second request is valid, forward the second request to the second virtual machine for causing the second virtual machine to execute a software function to cause the target hardware device to enter the target power mode.

### Claim 15

A non-transitory computer-readable medium comprising instructions that are executable by a processor for causing the processor to perform operations comprising:
receiving, by a first hypervisor supporting a first virtual machine, a first request from the first virtual machine indicating a target power mode for a target hardware device assigned to the first virtual machine; and
in response to receiving the first request, transmitting, by the first hypervisor, a second request indicating the target power mode for the target hardware device to a second hypervisor, the second hypervisor being configured to forward the second request to a second virtual machine, the second virtual machine being configured to cause the target hardware device to enter the target power mode in response to receiving the second request.

### Claim 16 (depends on 15)

The non-transitory computer-readable medium of claim 15, wherein the first request is a first virtual machine (VM) call executed by the first virtual machine to cause a first VM exit to the first hypervisor, and wherein the second request is a second VM call executed by the first hypervisor to interface with the second hypervisor.

### Claim 17 (depends on 16)

The non-transitory computer-readable medium of claim 16, wherein the second VM call is configured to trigger a system management interrupt that enables the processor to enter a system management mode, and wherein the second hypervisor and the second virtual machine are configured to execute within a privileged context of the system management mode.

### Claim 18 (depends on 15)

The non-transitory computer-readable medium of claim 15, wherein the first request further comprises a first power-mode identifier indicating the target power mode for the target hardware device.

### Claim 19 (depends on 18)

The non-transitory computer-readable medium of claim 18, wherein the first hypervisor is configured to:
generate a mapping table that correlates a first set of power-mode identifiers to a second set of power-mode identifiers, the second set of power-mode identifiers being different from the first set of power-mode identifiers;
extract, from the first request, the first power-mode identifier associated with the target power mode, the first power-mode identifier being in the first set of power-mode identifiers;
determine a second power-mode identifier that corresponds to the first power-mode identifier in the mapping table, the second power-mode identifier being in the second set of power-mode identifiers; and
include the second power-mode identifier in the second request transmitted to the second hypervisor, the second hypervisor being configured to identify the target power mode based on the second power-mode identifier.

### Claim 20 (depends on 15)

The non-transitory computer-readable medium of claim 15, wherein the second hypervisor is configured to:
validate the second request; and
in response to determining that the second request is valid, forward the second request to the second virtual machine for causing the second virtual machine to execute a software function to cause the target hardware device to enter the target power mode.
