openvmm_hcl
openvmm_hcl is the main user-mode VMM and management process inside the
OpenHCL Linux VTL2 environment.
Position in the boot flow
OpenHCL reaches openvmm_hcl after several earlier stages:
host loads OpenHCL IGVM into VTL2
`- openhcl_boot prepares memory, CPUs, and Linux boot data
`- Linux kernel boots the initrd
`- underhill_init prepares userspace
`- exec /bin/openvmm_hcl
Startup responsibilities
After Linux userspace starts, openvmm_hcl performs these broad tasks:
- Read VTL2 configuration and topology from the device tree and Linux interfaces established by the boot loader.
- Initialize host communication, diagnostics, tracing, and servicing control.
- Resolve the device and backend resources compiled into the image.
- Start the VM worker that owns the VTL0 processor and device data path.
- Start separate workers for devices whose isolation or lifecycle requires a process boundary.
- Coordinate pause, resume, save, restore, servicing, restart, and shutdown.
The process remains the policy and control-plane owner while worker processes perform high-volume VM and device work.
Worker model
The VM worker runs VTL0 virtual processors, handles exits, and coordinates the guest device model. Selected devices, including supported TPM configurations, can run in separate worker processes. OpenHCL communicates with those workers through typed channels rather than sharing arbitrary process state.
This process model allows a worker to be restarted or serviced while the main paravisor process retains policy and host communication state. It also limits which process directly handles sensitive device operations.
Trust boundaries
OpenHCL does not trust the VTL0 guest. In a confidential VM, it also cannot
blindly trust host-provided configuration. The measured IGVM and boot loader
establish which runtime inputs are acceptable before openvmm_hcl starts.
At runtime:
- Guest protocol and device requests are parsed as untrusted input.
- Confidential diagnostics omit or reject operations that could expose guest secrets.
- Host-directed actions are constrained by the image's measured policy and isolation mode.
- Repeated guest-triggerable failures use bounded or rate-limited diagnostics.
Debug and confidential-debug images intentionally expose more diagnostic surface than production confidential images. Do not treat them as equivalent security configurations.
Build and package
The supported path builds the whole firmware image:
cargo xflowey build-igvm x64
The recipe determines the target, features, kernel, initrd contents, boot
loader, sidecar, and manifest. See Building OpenHCL for available recipes,
artifact locations, and instructions for substituting a custom openvmm_hcl
binary.
A standalone openvmm_hcl file is not a bootable product. It expects the
OpenHCL kernel, initrd, device tree, memory layout, and measured configuration
provided by a matching IGVM recipe.
The crate only runs on Linux. Non-Linux workspace builds contain an unsupported-platform stub.
Diagnostics
The OpenHCL diagnostics server exposes information and development operations
owned by openvmm_hcl and its workers. Common sources include:
- Kernel and OpenHCL logs through
kmsgor configured serial output. - The inspect tree for build identity, control state, workers, devices, and tracing.
- Core dumps and saved-state dumps where isolation policy permits them.
- Performance, packet-capture, and memory-profile traces in supported builds.
Use ohcldiag-dev interactively. Its CLI and inspect paths are explicitly
unstable and confidential images restrict the available data.
Failure and restart behavior
A fatal failure in the main process ends the paravisor control plane. A worker
failure can sometimes be diagnosed or restarted through the main process,
depending on the worker and VM state. The ohcldiag-dev restart command targets
the VM worker while keeping VTL0 running where the runtime supports that
transition.
For startup failures:
- Capture the VTL2 kernel and OpenHCL log from the beginning of boot.
- Verify that the IGVM recipe contains the expected custom binary and initrd.
- Inspect
/etc/underhill-build-info.jsonthrough a working diagnostic shell to confirm the running revision. - Check the device tree and command line produced by
openhcl_boot. - Reproduce with an unmodified recipe before attributing the failure to a worker or host interface.
OpenHCL boot flow describes the stages before this process starts. Processes and components shows the complete process model. ohcldiag-dev documents the development diagnostic client.