Supported targets
All Qualcomm® Linux development kits support KVM-based virtualization. Each target uses either KVM or Gunyah as its default boot mode. Table: Virtualization support by targetRefer release notes to know about platform capability and support for hypervisor solution.
Prerequisites and Kconfig
Enable the following in the host kernel configuration:Boot the kernel in EL2
Configure KVM as the default boot mode on supported platforms. See the release notes to determine the virtualization capabilities of each platform and identify any exceptions. The boot mode is selected by the platform-specific DTB or XBL configuration image flashed to the target. Refer to the following table to identify the image that contains the UEFI device tree nodes and the file that selects KVM or Gunyah boot.
For CQ2390M/CQ2390S and IQ10/Nord,
xbl_config.elf contains only XBL-specific DT
nodes. UEFI-specific DT nodes are in uefi_dtbs.elf or
uefi_dtbs_kvm.elf.
For Hamoa/IQ-X7181 and Purwa/IQ-X5121, xbl_config.elf contains only
XBL-specific DT nodes. UEFI-specific DT nodes are in the compressed
uefi_dtbs.xz or uefi_dtbs_kvm.xz image. Use the compressed .xz image on
these platforms.
For IQ9/IQ-9075/Lemans, IQ8/IQ-8275/Monaco, and IQ6/IQ615/Talos,
xbl_config.elf contains DT nodes for both XBL and UEFI.
VendorDtbOverlays EFI variable updates are not required when switching
between KVM and Gunyah on targets that use uefi_dtbs.elf, uefi_dtbs.xz,
uefi_dtbs_kvm.elf, or uefi_dtbs_kvm.xz. On these targets, the boot mode
is selected by flashing the matching UEFI DTB image.build/tmp/deploy/images/<machine-name> in the
Yocto build output. Replace <machine-name> with the actual Yocto machine
configuration name, for example iq-9075-evk.
Switch to KVM
If the platform boots into Gunyah instead of KVM, use the following steps to switch to KVM. Complete the steps in the sequential order:-
Reboot into fastboot mode. Run the following command on the device shell:
-
Flash the KVM boot file from the host.
For CQ2390M/CQ2390S and IQ10/Nord:
For Hamoa/IQ-X7181 and Purwa/IQ-X5121:For IQ9/IQ-9075/Lemans, IQ8/IQ-8275/Monaco, IQ6/IQ615/Talos, QCS6490/Kodiak/RB3Gen2, and QCS5430/Kodiak/RB3Gen2Lite:
-
Reboot the device:
Platforms configured to boot into KVM by default do not require these steps unless you need to switch back to KVM after booting into Gunyah.
Switch to Gunyah
Use the following steps:-
Reboot into fastboot mode. Run the following command on the device shell:
-
Flash the Gunyah boot file from the host.
For CQ2390M/CQ2390S and IQ10/Nord:
For Hamoa/IQ-X7181 and Purwa/IQ-X5121:For IQ9/IQ-9075/Lemans, IQ8/IQ-8275/Monaco, IQ6/IQ615/Talos, QCS6490/Kodiak/RB3Gen2, and QCS5430/Kodiak/RB3Gen2Lite:
-
Reboot the device:
Build the guest VM artifacts
Before you launch a guest VM, build a guest kernel image and a guest root file system. The host image doesn’t include either component.Build the guest kernel
The guest runs at EL1 and doesn’t require Qualcomm board device trees or EL2 configuration. Build the guest kernel by using the upstream arm64 defconfig. Use the same kernel source tree that you use for the host:-
Build the kernel with the standalone
kmakeworkflow. For host setup, see Build the kernel without Yocto. -
Add the virtio front-end drivers the guest needs. The upstream
defconfigalready enables the common ones; confirm and add any that are missing using a configuration fragment:For the full list of virtio Kconfig symbols by device, see Supported virtio devices.
../kobj-guest/arch/arm64/boot/Image.
Build the guest root file system
Use Yocto to build a minimal guest root file system. The same recipe generates both the CPIO ramdisk and the ext4 disk image.-
Open a kas shell in your workspace:
-
Add the required image types to
build/conf/local.confso the build produces both a ramdisk and a disk image: -
Build the console image, which is the smallest supported image and adequate
for a guest:
-
Collect the artifacts from the deploy directory:
You can use any arm64 root file system as a guest. If you don’t need a Yocto-built guest image, use an aarch64 distribution cloud image with the -drive option instead of rootfs.ext4.
Stage the artifacts on the device
Copy the guest kernel and root file system to the host device and place them in the directory that the following examples use:Launch a guest VM
Before launching a guest VM, ensure the guest kernel image (Image), root file system CPIO (rootfs.cpio.gz), and root file system image (rootfs.ext4) are present in the /mnt/overlay/guest/ directory on the host. To produce them, see Build the guest VM artifacts.
Using QEMU
Boot with a ramdisk:Validate guest shell access
When QEMU is launched with-nographic, the guest serial console is attached to the current terminal. The boot log should print in the same terminal and end at either an automatic guest shell or a login prompt.
Expected guest console flow:
root username without a password.
Guest shell PASS criteria:
Run a basic command in the guest shell:
Validate host stability
While the guest VM is running, open a separate host shell and check host system health:
Guest virtualization validation passes when the guest reaches an interactive shell and the host remains responsive without new virtualization-related kernel errors.
Using libvirt
Libvirt manages VMs through thevirsh command-line utility and the libvirtd daemon. Define a VM from an XML domain file, then control it with the following commands:
Table: Common virsh VM management commands
Replace the following:
<xml-file>by the path to the libvirt XML domain definition file.<domain>by the VM domain name as defined in the XML<name>element.
Virtio device support
Virtio provides a paravirtualized I/O framework for high-performance device emulation between guest VMs and the host. Front-end drivers run in the guest OS; back-end drivers run in QEMU or the kernel. Communication uses virtqueues (ring buffers) to minimize guest-to-host transitions. Table: Supported virtio devicesHost-to-guest file sharing (virtio-9p)
Pass a host directory to a guest VM using the 9P file system:<mount-point>by the directory inside the guest to mount the shared folder.
Virtual sockets (VSOCK)
VSOCK enables socket communication between guest VMs and the host using a context identifier (CID). The host CID is always 2; guest CIDs start from 3. Table: Reserved CID values
Add VSOCK to a QEMU invocation:
<cid>by the CID to assign to the guest VM, for example73.
Device passthrough
Physical devices can be passed through to a guest VM using VFIO (PCI), libusb (USB), or a chardev backend (UART). Identify USB devices on the host:lsusb:
lspci:
<vid>and<pid>by the USB vendor and product ID in hex, for example0x0781and0x5567.<bus>,<slot>,<function>by the PCI address components fromlspcioutput.
chardev backend pointing to the host TTY device and expose it to the guest as a virtserialport.
Observability and maintenance
KVM traces
Enable KVM event tracing via tracefs:Watchdog
QEMU emulates an I6300 ESB watchdog device, exposed to the guest as a standard watchdog character device. Enable it in the guest kernel:action attribute controls behavior on timeout: reset restarts the guest, poweroff shuts it down. For details, see the libvirt watchdog documentation.
Remote command execution
The QEMU guest agent (qemu-ga) allows commands to be run on a guest VM from the host without a network connection. Enable qemu-ga in the guest OS user space and configure it through a virtio-serial interface.
Use virsh qemu-agent-command with the guest-exec subcommand to execute commands remotely:
<domain>by the VM domain name.

