Configuring the hypervisor host

The hypervisor host domain is configured through a buildfile, exactly like a QNX OS image.

For details about how to write QNX buildfiles, including buildfile structure, contents, and syntax, see the OS Image Buildfiles chapter in the QNX OS Building Embedded Systems guide.

The buildfile for a hypervisor host differs from buildfiles for standard QNX OS images in the following sections:

Flag for enabling hypervisor features at startup
The QNX OS microkernel includes built-in support for virtualization and, thus, QNX hypervisor. To enable the hypervisor features, pass the -Q enable flag setting into the startup program. This setting enables the best supported hardware virtualization mode. For AArch64 platforms, you can explicitly specify the exception level (EL) at which the host should run. This is done by modifying the bootstrap portion of the buildfile:
[image=0x40100000]
[uid=0 gid=0]
[virtual=aarch64le,raw] boot = {
   [+keeplinked] startup-iMX8QM -P 1 -Q enable,el2-host -W -vv
   [+keeplinked] PATH=/proc/boot:/sbin:/bin:/usr/bin:/opt/bin/sbin:/usr/sbin
   LD_LIBRARY_PATH=/proc/boot:/lib:/usr/lib:/lib/dll:/opt/lib procnto-smp-instr -ae -v
}

In the example above, el2-host is included to turn on Virtualization Host Extensions (VHE) support, which means the host runs at EL2 at all times. If you specify el1-host instead, the startup enables virtualization without VHE and runs the host OS at EL1. Note that ARMv8.1 CPUs and later support el2-host and VHE; it would be unusual to specify el1-host for such systems.

On x86 platforms, you simply specify -Q enable; there's no need to request a specific exception level.

The startup program then passes the necessary information onto the microkernel process (procnto) so it can enable its hypervisor host mode and, hence, support the qvm processes that the hypervisor host creates.

For more information about this flag, see the startup-* entry in the QNX OS Utilities Reference.

Host domain code
The buildfile contains instructions to include and start the qvm, and other code that will run in the hypervisor host domain. For example, the following command includes and starts a qvm process instance, which assembles a VM:
qvm
VM (qvm) configuration files
The buildfile includes the paths to the configuration files that different qvm process instances use when creating and assembling VMs, and indicates where to place these configuration files in the image. For example:
/vm/config/qnx80.qvmconf = guests/qnx80/qnx80.qvmconf
Virtual device (vdev) shared objects
The virtual device modules (vdev-*.so) are included in the shared objects list. For example:
vdev-8259.so
vdev-ser8250.so
vdev-timer8254.so
vdev-mc146818.so
vdev-virtio-console.so
vdev-virtio-blk.so
vdev-virtio-net.so
vdev-shmem.so
vdev-pckeyboard.so
vdev-ioapic.so
vdev-pci-dummy.so
vdev-hpet.so
vdev-pl011.so
vdev-vgpu-gvtg.so
vdev-progress.so

Unused components

The buildfile should include only components required by the hypervisor host.

You should remove all components that aren't required, so they don't get included in the hypervisor host image. For example, if a device (e.g., USB) is passed through to a guest, the host (or another guest) may not also have access to the device, so you should remove the driver from the hypervisor host buildfile (see pass in the VM Configuration Reference chapter).

Support for PCI pass-through devices

If your hypervisor system will pass through PCI devices, you must include the pci_server-qvm_support.so module in your hypervisor host image. For instructions on doing so, see the pci-server reference in the QNX OS Utilities Reference.

Page updated: