Methods of building a QNX Hypervisor for Safety system

Building a QNX Hypervisor for Safety system entails adding virtualization to a QNX OS for Safety microkernel system.

There are two ways to do this:
  1. If you are already booting a non-hypervisor QNX OS for Safety target system, follow the Build a hypervisor based on a BSP section. This explains how you can add the virtualization extension module and hypervisor binaries to your existing build.
  2. If you do not have an existing bootable target, look at the Build a hypervisor in the HHBSP framework (default settings) or Build a hypervisor in the HHBSP framework (custom settings) section. There are scripts and sample image configuration files that show you how to collect the binaries needed to make a bootable hypervisor-enabled target image from scratch.
In both cases, however, the process is the same:
  1. Add the virtualization module (libmod_qvm-safety.a) to your bootable QNX OS for Safety system.
  2. Make the hypervisor binaries available to the target system. These binaries are qvm and its supporting vdev-*.so files.
  3. Ensure that the runtime environment is correct before starting the qvm process, the smmuman service, PCI services, etc.

Build a hypervisor based on a BSP

With this method, you start with the BSP for a board that meets your hardware requirements to support the hypervisor, edit the buildfile to include the hypervisor module, vdevs, and other components, and otherwise configure your build, then build the host in whatever location is convenient. You can then assemble the host and its guests into an image and transfer it to your target.

This is a good method to use when you are preparing a production system, as it gives you full control of the contents and configuration of your finished system.



Figure 1. QNX hypervisor host and guest components used in creating a hypervisor system based on a host BSP

For step-by-step instructions on how to use this method, see Building the host and Building guests.

Build a hypervisor in the HHBSP framework (default settings)

This method for building a hypervisor uses:

The diagram below illustrates the HHBSP framework, and how it uses different BSPs: the board-agnostic HHBSP with a board-specific BSP to create an IFS for the hypervisor host, a QNX guest BSP to create an IFS for a QNX guest, and a Linux package to create an image for a Linux guest.



Figure 2. Board-specific host BSP, board-agnostic HHBSP layer, and guest components used in creating a hypervisor system based on the HHBSP framework

This method is probably the best method to use the first time you build a hypervisor system. It will build a system you can use to get familiar with the hypervisor and its capabilities.

For step-by-step instructions on how to use this method, see The HHBSP framework and Building in the HHBSP.

Build a hypervisor in the HHBSP framework (custom settings)

This method for building a hypervisor also uses the HHBSP framework, but doesn't require you to place the components (board-specific BSPs, guest BSPs) in specific locations. You modify the configuration file (configure.mk) or use the command line to set environment variables so you can leave BSPs outside the HHBSP framework and simply point to them.

This is probably the best method to use for prototyping when you start developing a hypervisor project. You can have different BSPs in convenient locations, modify the BSPs, and simply change environment variables to point to certain locations when you want to try new configurations and new components.

For step-by-step instructions on how to use this method, see The HHBSP framework and Building in the HHBSP.