# US 10,310,879 B2 · Paravirtualized virtual GPU

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

- Number: US 10,310,879 B2
- Document ID: US10310879B2
- Status: Granted
- Kind: B2
- Application number: 13/270,082
- Filed: 2011-10-10
- Published: 2013-04-11
- Granted: 2019-06-04
- Earliest claimed: 2011-10-10
- Assignees: NVIDIA Corporation
- Applicants: William J. Earl; Kevin J. Kranzusch; Satya Kiran Popuri; Christopher W. Johnson
- Inventors: William J. Earl; Kevin J. Kranzusch; Satya Kiran Popuri; Christopher W. Johnson
- Web page: https://patentgrep.com/patent/US10310879B2

## CPC

- G06F 9/4555: {Para-virtualisation, i.e. guest operating system has to be modified}
- G06F 9/45558: {Hypervisor-specific management and integration aspects}
- G06F 2009/45579: {I/O management, e.g. providing access to device drivers or storage}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

An embodiment of the invention sets forth a primary processing unit, a secondary processing unit coupled to the primary processing unit and accessible via a plurality of channels and a plurality of guest virtual machines executing on the primary processing unit. Each guest virtual machine includes a driver associated with the secondary processing unit, and a privileged virtual machine executing on the primary processing unit and configured to allocate a different set of channels of the plurality of channels to each of the drivers included in the guest virtual machines, where a first set of channels allocated to a first driver enables the first driver to access the secondary processing unit without conflicting with any of the other and with minimal performance overhead by directly accessing the secondary processing unit channels.

## Claims

### Claim 1

A computer system, comprising:
a primary processing unit;
a secondary processing unit that is coupled to the primary processing unit and accessible via a plurality of channels;
a plurality of guest virtual machines executing on the primary processing unit, wherein each guest virtual machine includes a driver associated with the secondary processing unit; and
a privileged virtual machine executing on the primary processing unit and configured to allocate a different set of channels included in the plurality of channels to each of the drivers included in the plurality of guest virtual machines,
wherein a first set of channels included in the plurality of channels allocated to a first driver included in a first guest virtual machine enables the first driver to directly access the secondary processing unit without conflicting with and being protected from any of the other drivers included in the plurality of guest virtual machines, and
wherein the first driver accesses the second processing unit by writing commands to a command buffer and communicating addresses of the commands to the secondary processing unit via the first set of channels.

### Claim 2 (depends on 1)

The computer system of claim 1, wherein each guest virtual machine includes a proxy resource manager configured to communicate with the privileged virtual machine via remote procedure calls.

### Claim 3 (depends on 2)

The computer system of claim 2, wherein the first guest virtual machine includes a first proxy resource manager configured to:
transmit a request to the privileged virtual machine to set up access to the secondary processing unit for the first driver, and
receive a communication from the privileged virtual machine that the first set of channels has been allocated to the first driver,
wherein the privileged virtual machine maps one or more control registers associated with the first set of channels into a portion of a memory space accessible by the first driver, wherein each control register is associated with a different channel in the first set of channels, and each channel in the first set of channels is populated with commands based on the contents of the associated control register associated with the channel.

### Claim 4 (depends on 3)

The computer system of claim 3, wherein the first driver accesses the second processing unit by further populating a control register associated with a first channel included in the first set of channels with at least a first memory address associated with the command buffer.

### Claim 5 (depends on 2)

The computer system of claim 2, wherein the privileged virtual machine includes an emulation software module that is configured to emulate a portion of the secondary processing unit, and the proxy resource manager is configured to:
route a request to access the portion of the second processing unit from the first driver to the emulation software module, and
transmit data from the emulation software module to the first driver in response to the request.

### Claim 6 (depends on 2)

The computer system of claim 2, wherein the privileged virtual machine includes an emulation software module that is notified each time an event is raised by the second processing unit, and a first proxy resource manager is configured to:
route a request to register for a first event that is to be raised by the second processing unit to the emulation software module, and
transmit a notification from the emulation software module to the first driver when the first event is raised by the second processing unit.

### Claim 7 (depends on 2)

The computer system of claim 2, wherein the privileged virtual machine includes an emulation software module that is notified by the second processing unit each time a fault associated with any of the channels included in the plurality of channels occurs.

### Claim 8 (depends on 7)

The computer system of claim 7, wherein a first proxy resource manager is configured to receive a notification from the emulation software module when a fault associated with a first channel included in the first set of channels occurs and to transmit the notification to the first driver.

### Claim 9 (depends on 1)

The computer system of claim 1, further comprising a display, wherein each of the guest virtual machines includes a display driver configured to render display frames onto the display.

### Claim 10 (depends on 9)

The computer system of claim 9, wherein the privileged virtual machine includes an emulation software module that is configured to trap a display command transmitted by a first display driver included within the first guest virtual machine that pertains to rendering a first display frame onto the display.

### Claim 11 (depends on 10)

The computer system of claim 10, wherein the emulation software module is further configured to translate the display command into a different display command for rendering the first display frame in a portion of the display allocated to the first guest virtual machine.

### Claim 12 (depends on 1)

The computer system of claim 1, wherein the privileged virtual machine is configured to de-allocate the first set of channels from the first driver when the first guest virtual machine is terminated.

### Claim 13

A method for configuring a virtual machine executing on a primary processing unit to access a secondary processing unit, the method comprising:
receiving a first request from a driver residing within the virtual machine to set up access to the secondary processing unit;
transmitting a second request to a hardware resource manager to set up access to the secondary processing unit for the driver;
receiving a communication from the hardware resource manager that a first channel providing access to the secondary processing unit has been allocated to the driver; and
notifying the driver that the driver can transmit one or more commands directly to the secondary processing unit via the first channel,
wherein the driver writes commands to a command buffer and communicates addresses of the commands to the secondary processing unit via the first channel.

### Claim 14 (depends on 13)

The method of claim 13, further comprising mapping a set of control registers associated with the first channel into a portion of a memory space accessible by the driver.

### Claim 15 (depends on 14)

The method of claim 14, wherein the driver notifies a control register associated with the first channel that the one or more commands are stored in the command buffer, wherein the one or more commands stored in the command buffer are transmitted to the second processing unit via the first channel in response to the notification.

### Claim 16 (depends on 13)

The method of claim 13, further comprising trapping a first display command transmitted by a display driver executing within the virtual machine for rendering a display frame onto a display, and translating the first display command into a second display command for rendering the display frame in a portion of the display allocated to the virtual machine.

### Claim 17

A non-transitory computer readable medium for storing instructions that, when executed by a processor, cause the processor to configure a virtual machine executing on a primary processing unit to access a secondary processing unit, by performing the steps of:
receiving a first request from a driver residing within the virtual machine to set up access to the secondary processing unit;
transmitting a second request to a hardware resource manager to set up access to the secondary processing unit for the driver;
receiving a communication from the hardware resource manager that a first channel providing access to the secondary processing unit has been allocated to the driver; and
notifying the driver that the driver can transmit one or more commands directly to the secondary processing unit via the first channel,
wherein the driver writes commands to a command buffer and communicates addresses of the commands to the secondary processing unit via the first channel.

### Claim 18 (depends on 17)

The computer readable medium of claim 17, further comprising mapping a set of control registers associated with the first channel into a portion of a memory space accessible by the driver.

### Claim 19 (depends on 18)

The computer readable medium of claim 18, wherein the driver notifies a control register associated with the first channel that the one or more commands are stored in the command buffer, wherein the one or more commands stored in the command buffer are transmitted to the second processing unit via the first channel in response to the notification.

### Claim 20 (depends on 17)

The computer readable medium of claim 17, further comprising trapping a first display command transmitted by a display driver executing within the virtual machine for rendering a display frame onto a display, and translating the first display command into a second display command for rendering the display frame in a portion of the display allocated to the virtual machine.

### Claim 21

A non-transitory computer readable medium for storing instructions that, when executed by a processor, cause the processor to configure a virtual machine executing on a primary processing unit to access a secondary processing unit, by performing the steps of:
receiving a first request from a driver residing within the virtual machine to set up access to the secondary processing unit;
transmitting a second request to a hardware resource manager to set up access to the secondary processing unit for the driver;
receiving a communication from the hardware resource manager that a first channel providing access to the secondary processing unit has been allocated to the driver; and
notifying the driver that the driver can transmit one or more commands directly to the secondary processing unit via the first channel,
wherein the driver writes the one or more commands to the command buffer and notifies a control register associated with the first channel that the one or more commands are stored in the command buffer, wherein the one or more commands stored in the command buffer are transmitted to the second processing unit via the first channel in response to the notification.
