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
- BlackBerry 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 BlackBerry 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 BlackBerry 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
Check Out Our Other Ultimate Guides
Embedded Systems Security