This disclosure relates generally to virtualized computing platforms and, more particularly, to requirement based exposure of engines of a Graphics Processing Unit (GPU) to a virtual machine (VM) consolidated on a computing platform.
A hypervisor may consolidate VMs on a computing platform including a GPU to enable sharing of engines executing on the GPU between the VMs. The GPU may be part of a GPU system including a number of other GPUs. Engines of the GPU shared with a VM may be different from engines of another GPU. The difference in engines between the GPUs may render a process of migration of the VM between the GPU and the another GPU extremely challenging.
Disclosed are a method, a device and/or a system of requirement based exposure of engines of a Graphics Processing Unit (GPU) to a virtual machine (VM) consolidated on a computing platform.
In one aspect, a method includes executing a driver component on a hypervisor of a computing platform including a GPU. The hypervisor is configured to consolidate a number of VMs on the computing platform and to virtualize resources thereof. The GPU executes a number of engines thereon. The method also includes executing an instance of the driver component in each of the number of VMs, and defining, through the hypervisor, a data path between a VM and a subset of the engines of the GPU in a configuration register associated with the VM in accordance with a requirement of an application executing on the VM.
Further, the method includes reading, through the instance of the driver component in the VM, an emulated version of the configuration register during loading thereof, and limiting, through the hypervisor, one or more processing functionalities provided to the VM based on solely exposing the subset of the engines of the GPU to the application executing thereon in accordance with the data path definition in the configuration register.
In another aspect, a non-transitory medium, readable through a computing platform and including instructions embodied therein that are executable through the computing platform, is disclosed. The non-transitory medium includes instructions to execute a driver component on a hypervisor of the computing platform including a GPU. The hypervisor is configured to consolidate a number of VMs on the computing platform and to virtualize resources thereof. The GPU executes a number of engines thereon. The non-transitory medium also includes instructions to execute an instance of the driver component in each of the number of VMs, and instructions to define, through the hypervisor, a data path between a VM and a subset of the engines of the GPU in a configuration register associated with the VM in accordance with a requirement of an application executing on the VM.
Further, the non-transitory medium includes instructions to read, through the instance of the driver component in the VM, an emulated version of the configuration register during loading thereof, and instructions to limit, through the hypervisor, one or more processing functionalities provided to the VM based on solely exposing the subset of the engines of the GPU to the application executing thereon in accordance with the data path definition in the configuration register.
In yet another aspect, a computing platform includes a memory and a GPU communicatively coupled to the memory. The GPU is configured to execute a number of engines thereon. The computing platform also includes a hypervisor configured to consolidate a number of VMs thereon and to virtualize resources thereof. The hypervisor includes a driver component executing thereon. Each of the number of VMs executes an instance of the driver component thereon. The hypervisor is further configured to: define a data path between a VM and a subset of the engines of the GPU in a configuration register associated with the VM in accordance with a requirement of an application executing on the VM, and limit one or more processing functionalities provided to the VM based on solely exposing the subset of the engines of the GPU to the application executing thereon in accordance with the data path definition in the configuration register.
The instance of the driver component in the VM is configured to read an emulated version of the configuration register during loading thereof.
The methods and systems disclosed herein may be implemented in any means for achieving various aspects, and may be executed in a form of a machine-readable medium embodying a set of instructions that, when executed by a machine, cause the machine to perform any of the operations disclosed herein. Other features will be apparent from the accompanying drawings and from the detailed description that follows.
The embodiments of this invention are illustrated by way of example and not limitation in the figures of the accompanying drawings, in which like references indicate similar elements and in which:
Other features of the present embodiments will be apparent from the accompanying drawings and from the detailed description that follows.
Example embodiments, as described below, may be used to provide a method, a device and/or a system of requirement based exposure of engines of a Graphics Processing Unit (GPU) to a virtual machine (VM) consolidated on a computing platform. Although the present embodiments have been described with reference to specific example embodiments, it will be evident that various modifications and changes may be made to these embodiments without departing from the broader spirit and scope of the various embodiments.
A hypervisor 108 may execute on computing platform 150; hypervisor 108 may be a high-level system software or a program enabling multiple operating systems share hardware resources of computing platform 150. Hypervisor 108 may control GPU 102 and memory 104 and resources of computing platform 150 to abstract each of the multiple operating systems; hypervisor 108 may consolidate virtual machines (VMs) on computing platform 150.
Driver stack 110 may include a resource manager stack 132 to manage assignment of resources of computing platform 150 to VMs 1121-N. Resource manager stack 132 may enable hypervisor 108 provide a virtualized GPU instance (vGPU) 1961-N to each VM 1121-N. GPU 102 may include a number of engines 1881-M (e.g., sets of instructions), each of which is configured to realize one or more specific functionalities. For example, a first engine 1881 may handle rendering of data, a second engine 1882 may handle scanning out the rendered data onto a screen of a display unit (not shown), a third engine 1883 may perform video encoding and so on. The aforementioned engines 1881-M may work independently during handling requests for functionalities thereof and/or in parallel with one another.
As shown in
Further, a challenge of VM migration may be to migrate a VM 1121-N from GPU 102 to another GPU when GPU 102 and the another GPU differ in engines 1881-M supported therethrough.
In one or more embodiments, computing system 200 may enable specifying functionalities from a side of computing platform 250. In one or more embodiments, a user 270 (e.g., an administrator) of computing platform 250 may decide on the subset of engines 2881-M that is exposed to each VM 2121-N based on defining the limited functionalities associated therewith through hypervisor component 2181-N. Thus, in one or more embodiments, only a subset of engines 2881-M may be exposed to each VM 2121-N through the definition in hypervisor component 2181-N. In one or more embodiments, hypervisor component 2181-N may be configured to have a data path defined (e.g., data path definition 2681-N) between the each VM 2121-N and a desired subset of engines 2881-M therein. For example, data path definition 2681 for VM 2121 may be different from data path definition 2682 for VM 2122. Here, different subsets of engines 2881-M may be exposed to different VMs 2121-N.
In one or more embodiments, data path definitions 2681-N and/or configuration settings associated therewith may be made available through hypervisor component 2181-N in one or more configuration register(s). In one or more embodiments, hypervisor component 2181-N may enable guest driver component 2161-N access an emulated version of the one or more configuration register(s) (e.g., configuration register 2641-N shown as being associated with hypervisor component 2181-N; it should be noted that configuration register 2641-N may include one or more configuration register(s) therein). In one or more embodiments, during loading of guest driver component 2161-N, guest driver component 2161-N may read configuration register 2641-N to track the subset of engines 2881-M available thereto and capabilities/configuration(s) associated therewith.
Thus, in one or more embodiments, functionalities exposed to VMs 2121-N may be specified from the side of computing platform 250; hypervisor component 2181-N may provide configuration(s) available to guest driver component 2161-N executing on VM 2121-N. In one or more embodiments, hypervisor component 2181-N may solely expose an appropriate emulated configuration register 2641-N to a guest driver component 2161-N, where configuration register 2641-N may include information related to the subset of engines 2881-M available to said guest driver component 2161-N. In one or more embodiments, as discussed above, guest driver component 2161-N may read the configuration space (e.g., configuration register 2641-N associated therewith) during loading thereof and determine the subset of engines 2881-M allocated to VM 2121-N; other engines 2881-M may not be exposed thereto.
In one or more embodiments, the decision to expose subsets of engines 2881-M to VMs 2121-N as per requirements thereof may be made during creation of VMs 2121-N. It should be noted that the aforementioned decision-making and/or creation of data path definitions 2681-N/configuration registers 2641-N may dynamically occur during creation of VMs 2121-N. Pre-configuring hypervisor component 2181-N (configuration register 2641-N) with data path definition 2681-N through resource manager stack 232 is also within the scope of the exemplary embodiments discussed herein.
VGA driver component 3061-N may interact between desktop rendering application 3021-N and VGA device 3041-N. It should be noted that the desktop rendering discussed herein is merely for contextual purposes; the desktop rendering application 3021-N may provide an interface to the user with respect to the desktop rendering.
In one or more embodiments, sharing subsets of GPU engines 2881-M alone as discussed above may provide for efficient overall utilization of GPU 202. Further, migration of a VM from one GPU (e.g., GPU 202) to another GPU when the two GPUs differ in the engines supported therethrough may prove to be a challenge. Exemplary embodiments also provide for a means to meet the aforementioned challenge through solely exposing a subset of engines (e.g., engines 2881-M) common to both GPUs. In one or more embodiments, if the subset of GPU engines exposed to the VM (e.g., VM 2121-N) is available in both GPUs, the VM can be migrated from one GPU (e.g., GPU 202) to another. It should be noted that GPU 202 may be part of a GPU system including a number of GPUs; the GPU system also may include the another GPU. Here, hypervisor 208 may configure the another GPU with the subset of GPU engines exposed to the VM through the GPU.
In one or more embodiments, operation 410 may then involve limiting, through hypervisor 208, one or more processing functionalities provided to VM 2121-N based on solely exposing the subset of engines 2881-M to application 2981-N executing thereon in accordance with the data path definition (e.g., data path definition 2681-N) in configuration register 2641-N.
Although the present embodiments have been described with reference to specific example embodiments, it will be evident that various modifications and changes may be made to these embodiments without departing from the broader spirit and scope of the various embodiments. For example, the various devices and modules described herein may be enabled and operated using hardware circuitry, firmware, software or any combination of hardware, firmware, and software (e.g., embodied in a non-transitory machine-readable medium). For example, the various electrical structures and methods may be embodied using transistors, logic gates, and electrical circuits (e.g., Application Specific Integrated Circuitry (ASIC) and/or Digital Signal Processor (DSP) circuitry).
In addition, it will be appreciated that the various operations, processes, and methods disclosed herein may be embodied in a non-transitory machine-readable medium (e.g., a Compact Disc (CD), a Digital Video Disc (DVD), a Blu-ray disc®, a hard drive; appropriate instructions may be downloaded to the hard drive) and/or a machine-accessible medium compatible with a data processing system (e.g., computing system 200; computing platform 250), and may be performed in any order (e.g., including using means for achieving the various operations).
Accordingly, the specification and the drawings are to be regarded in an illustrative rather than a restrictive sense.