What Is Paravirtualization?

Paravirtualization is a type of virtualization where software instructions from the guest operating system running inside a virtual machine can use “hypercalls” that communicate directly with the hypervisor. This provides an interface very similar to software running natively on the host hardware.

The main benefits of paravirtualization are where instructions are not compatible with full virtualization or where more immediate access to underlying hardware is required for performance reasons. For timing-critical functions, paravirtualization can provide the speed of native code alongside some of the benefits of virtualization, such as sharing hardware between multiple operating systems.

Examples of Paravirtualization

Paravirtualization has been available from several vendors for some years. Virtual machine platforms supporting paravirtualization include:

  • VMware ESXi hypervisor
  • Xen open-source hypervisor
  • Oracle VM VirtualBox hypervisor
  • QNX® Hypervisor

These hypervisors provide paravirtualization drivers for popular operating systems, enabling them to run in this mode with lower-level access to crucial hardware devices.

Paravirtualization for Automotive

Paravirtualization can assist embedded automotive systems in sharing access to peripherals. This can include the infotainment or instrument display, audio interfaces, touch interfaces, communication interfaces, and storage devices. The paravirtualization drivers will switch access between different operating systems that require the use of a peripheral.

An automotive hypervisor such as QNX Hypervisor can support access to peripherals in various ways. It can emulate hardware devices in a fully virtualized way. It can pass access through directly, giving exclusive control, with the virtual machine merely knowing that a memory range has been reserved. In paravirtualization mode, the hypervisor can avoid the constraints of full virtualization. This can be implemented via the Organization for the Advancement of Structured Information Standards (OASIS) VIRTIO specification.

For example, the QNX Hypervisor can enable graphics, video, audio, and input/touch to be shared between QNX and Android operating systems, providing performance benefits. In an automotive environment, minimizing latency can be mission-critical. Safety features must be executed without delay, and essential infotainment functions such as navigation will be improved by real-time execution.

Full Virtualization vs. Paravirtualization

Paravirtualization differs from full virtualization, where the guest operating system is unmodified and does not know it is functioning in a virtualized environment. It thinks that the hardware it addresses is real, rather than having a software layer emulating the hardware.

In contrast, paravirtualization requires the guest OS to be modified so that its “hypercalls” can directly address the underlying hardware via drivers that communicate with the hypervisor. This has positive implications for performance because there is no translation between the guest OS and the hardware, which can inject latency.

The main drawback with paravirtualization is that the modified operating system is not so easily portable. The guest OS must be modified for specific hardware rather than just the hypervisor. This makes upgrading to a new hardware platform more complicated. With full virtualization, guest operating systems can execute independently, whereas with paravirtualization, they must communicate with the hypervisor via special drivers.

Cloud Computing vs. Paravirtualization

Cloud computing is not in direct opposition to paravirtualization. A cloud computing service can provide both fully virtualized and paravirtualization environments. However, with a fully virtualized cloud service, off-the-shelf operating systems and applications can run as if hosted on the hardware being emulated. However, with a cloud service employing paravirtualization, the guest operating system must be modified to run in the environment. This usually involves drivers supplied by the hypervisor vendor for each operating system supported.
The QNX® Hypervisor is a real-time, Type 1 hypervisor that offers virtualization technology and enables the secure separation of multiple operating environments on a single SoC. It also facilitates safety regulations defined by the ISO and offers broad design flexibility. 

Check Out Our Other Ultimate Guides

Structural Dependency
Learn about software-defined vehicles, including their benefits and architecture.
Structural Dependency
Covers topics such as embedded systems protection, security exploits and mitigation, and best practices
Structural Dependency
Offers key concepts and information on standards for safe system design
Structural Dependency
Defines autonomous systems and the various levels of autonomy
Read the Guide