Updated: October 28, 2024 |
Guests in a QNX virtualized environment are configured in the same way as they are configured in a non-virtualized environment. For example, for QNX guests, use the buildfile.
[virtual=aarch64le,elf ...and for x86 you need:
[virtual=x86_64 ...
Both ARM and x86 guests require some additional instructions in their buildfiles (see Building guests in the Building a QNX Hypervisor system chapter). For more information about QNX buildfiles in general, see the OS Image Buildfiles chapter in Building Embedded Systems.
The location is a PCI device. It may be followed with two different types of specifier:
For instance, the following specifies that the vdev is an I/O device on port 4: io:4. For more examples of how these identifiers are used, see the loc option for the pass qvm configuration option in the VM Configuration Reference chapter.
If no resource type identifier is specified in the device configuration, a suitable default is chosen. The most common default resource type is mem, but the default changes according to the vdev. For example, the default resource type for VIRTIO devices is pci, though these devices can also be specified as mem resources. See the descriptions of individual devices for each device's default resource type.
A guest interrupt is specified by an entry in the VM configuration. This entry has two parts, separated by a colon. They identify, respectively:
On x86 platforms, the Local component Advanced Programmable Interrupt Controller (LAPIC) hardware is automatically supplied; there is no need to specify a vdev for it, and guest vdevs feeding interrupts to the LAPIC hardware should simply specify apic (with no colon or number following) for their interrupts.
On ARM platforms, the Generic Interrupt Controller (GIC) hardware is automatically supplied; it's not necessary to specify this vdev. However, you can specify it if you want to change the values for its options (see vdev gic in the Virtual Device Reference chapter). The default name for guest devices feeding interrupts to the GIC is gic, but you can use the vdev's name property to change this.
vdev ioapic loc 0xf8000000 intr apic name myioapic
vdev pl011 loc 0x1c090000 intr gic:37
Since the FDT information describing a vdev is generated by the qvm process at startup, this information can't be included in the FDT you provide for your guest—it isn't available when you create the FDT.
vdev moo_vdev name gary
vmoo: vmoo@0 { qvm,vdev = "gary"; }
With this information in your FDT, the qvm process will be able to provide the guest with an FDT that redirects all references to the node with qvm,vdev in your guest's FDT to the corresponding qvm vdev node it generates, then remove the qvm,vdev node.
For more details about FDTs in a QNX hypervisor system, see ACPI tables and FDTs in this chapter.
The following shows how to reference the node for a PIC in a qvm-generated FDT so that at startup the qvm process can update the guest's FDT:
vdev gic name gicfoo
vgic: vgic@0 { qvm,vdev = "gicfoo"; }
some-device-node { interrupt-parent = <&vgic>; };or its interrupt-map property:
interrupt-map = < 0 0 0 0 &vgic 0 140 0 0 0 0 1 &vgic 0 149 0 >
vdev pl011 loc 0x1c090000 intr gic:37 hostdev /dev/ser2
vdev pl011 loc 0x1c090000 intr gary:37 hostdev /dev/ser2