Virtual devices

A virtual device can emulate a physical device, or it can be a para-virtualized device (a virtual device for which no exact corresponding physical device exists).

Virtual devices (or vdevs) exist only in virtualized environments. They are software code that runs at the hypervisor layer and either emulates a physical device, or provides the functionality provided by a physical device without emulating any specific physical device.

To use the vdev, the guest requires a driver, just as it would require a driver to use a physical device in a non-virtualized environment.

A vdev may never access a physical device, or it may act as an intermediary that both responds directly to a guest and passes requests and responses between a guest and a physical device.

In a hypervisor system, vdevs are provided by the hypervisor in the qvm process for the VM that hosts the guest. The guest hosted in the VM receives interrupts from the virtual device and sends signals to it, exactly as though it were working with a physical hardware device. The guest has no direct communication with any physical device on the system; such a device may not even be present.

The guest requires a device driver for each vdev it will use, just as it would require a device driver if it were running in a non-virtualized environment and accessing a physical device.

The hypervisor supports the following types of virtual device:

Note:

The current hypervisor release doesn't support user-created vdevs without QNX support. If your hypervisor system implementation requires vdevs not included in this release, please contact your QNX representative to have QNX Engineering Services write the vdevs for you.

Emulation vdevs

An emulation vdev (or simply vdev) is a virtual device that emulates an actual physical device for a guest. The following are key characteristics of emulation vdevs in a QNX virtualized environment:

Para-virtualized devices

Para-virtualized devices are a type of virtual device. They are software code that runs in the hypervisor layer, but this code doesn't emulate any specific hardware device.

Instead, a para-virtualized device provides the functionality that might be provided by a physical device (or several physical devices) in a non-virtualized environment, but without the constraints of emulating a piece of hardware.

A typical para-virtualized device has code running in the guest (front-end), and code running outside the guest (back-end); for example, a file system device driver running in the guest that connects to a block device driver running in the hypervisor host.

Key characteristics of para-virtualized devices include:

Para-virtualized devices require some initial investment (e.g., to write drivers), but these devices may often be more efficient than vdevs that must emulate a hardware component. For example, emulating a serial port interface that provides a console terminal can result in many guest exits and returns. A virtio-console driver (a para-virtualized serial port interface) provides the same functionality, but with less overhead in the guest.

Note: Para-virtualized devices don't have to be VirtIO devices; VirtIO is simply a convenient and currently popular standard.