Generic Accelerators Virtualization Interface
More and more complex heterogeneous ARM based SoCs embed combinations of powerful CPUs and parallel high energy efficient programmable accelerators. Virtualization of CPUs is a more mature technology than virtualization of accelerators, due to a late introduction of accelerators hardware extensions for virtualization support. Virtualization of accelerators would lower the overall costs by hardware sharing and thus better workload allocation, thus increasing the flexibility of the overall system.
Latest improvements in virtualization-aware devices combined with VFIO and CPU virtualization extensions allow an almost negligible overhead compared to native accelerators usage. There are multiple possible accelerators that can be virtualized (e.g., GPU, FPGA, etc.), thus requiring for a common virtualization framework aiming to reduce software fragmentation and to decrease maintenance costs/efforts. Virtual Open Systems has developed a generic virtualization interface based on VFIO to embrace multiple possible accelerators hardware under the same virtualization framework.
Architecture description of an accelerators virtualization framework
The generic virtualization interface decouples the open source virtualization software from the accelerator specific vendor software (e.g., device drivers). Such a virtualization framework and its components are illustrated in the picture below.
Top level architecture of an accelerators virtualization framework
As depicted, the virtualization framework is composed of the following three main components:
- The Virtual Accelerator (vACC) Manager is in charge of assigning accelerator instances to virtual machines through VFIO. The assignment will be carried out through the virtualization interface of the specific accelerator instance. This component is capable of handling a diverse set of accelerators (e.g., GPUs, FPGAs or any other custom accelerator); indeed, the interaction is abstracted by the virtualization interface and does not require the vACC manager to know any detail of each specific device. For the sake of abstraction, each accelerator is represented in the vACC manager by a virtual accelerator (vACC), whose structure is common to all accelerators types, and which exports a set of virtual contexts (vCTXs). Virtual Contexts represent the unit of computation to be assigned to a virtual machine, and might correspond to a physical execution context of the device. Alternatively the same physical execution context could be multiplexed among multiple vCTXs. This is however an hardware implementation detail that is usually hidden to the virtualization framework by the device driver interface.
- The Virtualization Interface defines a set of methods to be implemented in order to handle virtualization ready accelerators (e.g., GPU, FPGA, etc.). The methods were defined assuming virtualization support specificities provided by the accelerator. The virtualization interface comprehends methods to handle creation or destruction of virtualization contexts. They can be used once an accelerator has been registered by its device driver to the vACC Manager.
- The Vendor Device Driver is a Linux Kernel driver which contains device specific code, implements the various methods of the virtualization interface for the specific accelerator (i.e., creation and destruction of vCTXs). The driver of a device aiming at exploiting the virtualization interface should first register the accelerator to the vACC manager. This is usually performed during initialization in the probe function of the driver, the rest of the driver functionalities can be kept unchanged with respect to a regular driver with no virtualization support. This component implements the additional methods required to use the virtualization interface. These methods are passed to the vACC manager during accelerator registration.
In the next figure, it is shown the whole environment at work, highlighting the interface between the hardware and the software world. The accelerator model is composed by multiple execution contexts which are computing units, each executing different tasks in parallel. This scheme reflects the actual implementation of most virtualization-ready devices (e.g., GPUs) that allow multiple virtual machines to concurrently submit computing kernels to the accelerator, and experience almost native execution performance.
Execution environment of the accelerators virtualization framework
In addition, and to show that the virtualization interface is completely decoupled from any dedicated hardware, Virtual Open Systems has implemented a generic accelerator model written in the LISA+ language and has integrated it within the ARM Fast Models emulation platform. This model is used to disseminate the virtualization interface with an easy to deploy example; hardware designers have now a tool to test the interface without the need to create their own hardware device supporting virtualization.
The generic virtualization interface presented in this page is of utmost interest for High Performance Computing (HPC) to consolidate workloads, increase flexibility and minimize operational costs in a context where virtualized applications can take advantage of the devices available to accelerate data processing. At the same time this work is of interest for any other segment of the embedded devices market where virtualized environments execute rich graphics applications.
Generic accelerators virtualization framework: download the source code
This work has been developed under the FP7 SAVE European funded project. All the components of the generic virtualization interface are publicly accessible from the Virtual Open Systems website. Upon registration and login the archive containing the source code can be downloaded from the following url: http://www.virtualopensystems.com/downloads/products/accelerators_virtualization_interface/vosys-virt-intf.zip
Register/Login to download resources
Access to the resources require the user to be logged in, for which registration is mandatory to the Virtual Open Systems website. Resources download can be also performed with wget and curl tools after login operation as it follows for wget:
$ wget --save-cookies cookies.txt --post-data 'username=youruname&password=yourpw' \ http://www.virtualopensystems.com/logintrml/ $ wget --load-cookies cookies.txt http://www.virtualopensystems.com/path_to_resource
And for curl:
$ curl -d "username=youruname&password=yourpw" --dump-header headers \ http://www.virtualopensystems.com/logintrml/ $ curl -L -b headers http://www.virtualopensystems.com/path_to_resource > resource
About Virtual Open Systems
Virtual Open Systems is an innovative and dynamic company specializing in open source virtualization solutions and custom development services for Linux/Android, NFV networking and vSwitch solutions, cloud computing, automotive virtualization mixed-criticality systems, accelerators virtualization, etc. Virtual Open Systems delivers efficient solutions that help customers to optimize system costs and to reduce development cycle for products introduction to market while improving control, security and meeting new business targets.
Virtual Open Systems provides development and integration, consulting and support services on Linux & Android virtualization solutions, specializing on the Linux Kernel Virtual Machine (KVM) for embedded multi-core architecture systems and ARM based servers, as well as virtualization products.
Virtual Open Systems Development Custom Services
Today, next generation of SoC platforms based on ARMv8 architecture for automotive, drones, industrial mixed-criticality systems, consumer devices, smart phones, internet connected IoT appliances, data center servers, NFV infrastructures, etc. can use native virtualization to introduce new types of applications or services or a way to improve security and to reduce their carbon footprint.
Virtual Open Systems, while building and continuously extending a strong know-how based on virtualization software developments, provides customized virtualization on servers and embedded software porting services. For any inquiry related to the company virtualization products and custom porting services you can contact us.
- Virtual bfq
- Kvm performance
- Vosyshmem zerocopy
- Api remoting
- Vosyswitch nfv virtual switch
- Vosysmonitor jp 日本語
- Vosysmonitorx86 jp 日本語
- Vosysiot edge
- Vosysmonitor sossl framework
- Vosysmonitorv risc v
- Vosysmonitorv risc v jp 日本語
- vosysvirtualnet jp 日本語