Implementing a vdev

After you have developed your vdev, you must add it to your hypervisor system.

Adding a vdev to your hypervisor system

For up-to-date instructions on adding your vdev to your hypervisor system, see the QNX Hypervisor Public Forum at http://community.qnx.com/sf/projects/qnx_hypervisor_public_forum/, and go to Documents > Virtual Device Developers' Guide > README.txt. To access this site for the first time, you'll need to contact your QNX representative.

Note: The qvm process uses the standard shared object mechanisms and environment variables. For example, you can use LD_LIBRARY_PATH to set the search path, and DL_DEBUG path to set the debug level (see Setting PATH and LD_LIBRARY_PATH in the QNX Neutrino User's Guide and Diagnostics and debugging in the QNX Neutrino Programmer's Guide).

If your vdev emulates a physical device (e.g., vdev pl011), your guest OS may already have a device driver that will work with the vdev. If your guest doesn't have such a driver, you will need to write one and include it in your guest. For QNX guests, see the QNX SDP documentation; for other types of guest OS, refer to the appropriate documentation for those OSs.

We recommend that you start with one of the vdev examples available on GitHub at github.com/qnx, go through the steps described above to add it to your system, and confirm that everything works as expected. The examples work, so you can focus on making sure that you know how to implement a vdev. This way, when you have your own vdev ready to test, adding the vdev to your system and configuring the VM will be familiar tasks.

Compiling a vdev

If you compile a vdev using the QNX recursive makefile structure, you need vdev/common.mk, vdev/Makefile, and the entire vdev/name directory, where name is the name of the vdev directory; for example vdev/trace. For more information about this makefile structure, see the Conventions for Recursive Makefiles and Directories chapter in the QNX Neutrino Programmer's Guide.

This build system is just one way of compiling a vdev; you can use another system if you prefer.

Documented procedures showing how to compile in Windows and Linux are provided within the vdev source code download areas at github.com/qnx.

Adding a vdev to a QNX Hypervisor for Safety (QHS) system

DANGER

If you are building a safety-related system, you must use the QNX Hypervisor for Safety (QHS) variant that has been built and approved for use in the type of system you are building, and you must use it only as specified in its Safety Manual.

For general information about the QHS, see the QNX Hypervisor for Safety User's Guide.

If you write a vdev and add it to a QHS system, this addition compromises the system's safety certification. It is your responsibility to ensure that, if required, you update your system's Safety Manual to take into account the impact of your new vdev, and that your modified system:

  • meets the necessary safety requirements
  • receives appropriate certification
  • is used in accordance with its Safety Manual

The QHS includes safety-certified vdevs. These vdevs are built with digital signatures that identify them as safety-certified components; they can be identified by the -safety infix in their names (e.g., vdev-foo-safety.so). Your QNX representative can guide you in the certification process for your own custom vdevs.