Expand description
Runs a virtual machine
§Feature flags
-
default
— Default features of crosvm. This selection is somewhat arbitrary for historical reasons. -
android-sparse
— Enables support for the Android sparse image format in the block device. -
audio
(enabled by default) — Enables cross-platform audio devices -
balloon
(enabled by default) — Enables the virtio-balloon device which allows dynamic scaling of memory viavm_control
commands. See Balloon Device for more information. -
composite-disk
— Enables the composite-disk format, which adds protobufs as a dependency of the build. This format is intended to speed up crosvm’s usage in CI environments that might otherwise have to concatenate large file system images into a single disk image. -
config-file
(enabled by default) — Enables support for JSON configuration files that can be specified using--cfg
. See Configuration Files for more information. -
gdb
— Enables using gdb to debug the guest kernel. See GDB Support for more information. -
net
(enabled by default) — Enables virtio-net and vhost-user-net backend. -
pci-hotplug
— Enables PCI hotplug. Only available on Linux, and currently only for x86/x86-64. -
pvclock
— Enables virtio-pvclock. Currently only available for x86-64 and aarch64. -
qcow
(enabled by default) — Enables the use of the qcow format for block devices. -
registered_events
— Enables the registered_events mechanisms. -
swap
— Enables vmm-swap of guest memory. This is only available on Linux. -
stats
— Enables collection of VM statistics. -
tokio
— Supports tokio as an asynchronous executor. -
usb
(enabled by default) — Enables USB host device passthrough via an emulated XHCI controller. USB is supported only on unix/linux. The feature is a no-op on windows. -
wl-dmabuf
— Enables the non-upstream virtio wayland protocol. This can be used in conjuction with the gpu feature to enable a zero-copy display pipeline. -
x
— Enables the usage of the X11 protocol for display on the host.
§Graphics features
-
gpu
(enabled by default) — Enables basic virtio-gpu support. This includes basic display and input features, but lacks 3D acceleration in the absence of other crosvm features. -
gfxstream
— Enables 3D acceleration for guest via the gfxstream protocol over virtio-gpu. This is used for compatibility with the Android Emulator. The protocol provides the best speed and compatibility with GL/vulkan versions by forwarding the guest’s calls to the host’s graphics libraries and GPU. However, this means the sandbox is not enabled for the virtio-gpu device. -
gfxstream_stub
— Adds a stub implementation of gfxstream to allow us to compile the gfxstream feature without access to the gfxstream library. Note that this feature only allows compilation of gfxstream and will not be functional at runtime. -
virgl_renderer
— Enables 3D acceleration for the guest via the virglrenderer library over virtio-gpu. -
vulkan_display
— Enables the usage of Vulkan for display on the host.
§Video features
See Video Device for more information.
-
video-decoder
— Enables the video decoding device -
video-encoder
— Enables the video encoding device -
ffmpeg
— Enables the ffmpeg backend of video devices.
§Linux-specific feature flags
-
geniezone
— Enables the use of the GenieZone hypervisor -
gunyah
— Enables the use of the Gunyah hypervisor -
trace_marker
— Enables the Linux trace_marker backend for cros_tracing. This backend is only supported on Linux systems. It sends all cros_tracing tracepoints to the tracefs filesystem if mounted, for easier debugging with tools like trace-cmd. -
seccomp_trace
— Facilitate tracing all syscalls by sandboxed processes. -
noncoherent-dma
— Enables virtio-gpu devices to request a non-coherent memory mapping from the hypervisor. Currently only supported in KVM on x86 and requires kernel patches from: https://lore.kernel.org/all/20240105091535.24760-1-yan.y.zhao@intel.com/
§Windows-specific feature flags
These feature flags are only available on Windows builds of crosvm.
-
haxm
— Enables the use of the HAXM hypervisor -
whpx
— Enables the use of the WHPX hypervisor -
slirp
(enabled by default) — Enables a libslirp based network device. Currently only supported on Windows.
§Non-additive feature flags
These feature flags change the behavior of crosvm instead of adding functionality. This is deprecated and will be phased out.
default-no-sandbox
— Run crosvm with--disable-sandbox
by default.
§Project specific features
These features are specific to downstream projects and may not be functional or useful for standard linux builds of crosvm. They are however enabled in upstream builds for compile and test coverage in CI.
§ChromeOS
These features will only be functional in ChromeOS builds running on ChromeOS.
-
arc_quota
— Enables ARCVM specified virtio-fs feature including:- Support quota reporting for ARCVM Requires access to the org.chromium.ArcQuota dbus service.
- Support for FS_IOC_SETPERMISSION ioctl
- Support for FS_IOC_SETPATHXATTR ioctl
-
audio_aaudio
— Enables use of Android AAudio virtio-snd backend. -
libaaudio_stub
— Stub implementation of Android AAudio NDK library. This is only used for building and testing the Android audio on a non-Android target -
audio_cras
— Enables use of the ChromeOS audio server. ChromeOS builds will replace libcras_stub with an implementation that talks to the audio server. In upstream builds, using this option will panic. -
libvda
— Enables the VDA backend of the video devices. This feature requires the ChromeOS only libvda library and can be compiled but not linked. See b/244619291. -
libvda-stub
(enabled by default) — Builds the VDA video backend with a set of no-ops stubs instead of linking with libvda, which is only available on ChromeOS. -
plugin
— Enables the crosvm plugin API where functionality is provided via a FFI plugin API. This feature is used to integrate Parallels with crosvm and is not functional upstream. -
power-monitor-powerd
— Enables battery reporting via the ChromeOS powerd. Requires access to theorg.chromium.PowerManager
dbus service. -
vtpm
— Enables a virtualized TPM device that uses theorg.chromium.Vtpm
dbus service.
§Windows-future
These features will only be functional in future builds of windows crosvm.
crash-report
— Enables reporting of crosvm crashes
§Platform Feature Sets
These feature flags enable all features that are supported for a given platform. Note that these may include project specific features that will not be functional at runtime but are enabled for compile and test coverage.
-
all-default
— All features that are compiled and tested for aarch64 and x86_64 -
all-aarch64
— All features that are compiled and tested for aarch64 -
all-riscv64
— All features that are compiled and tested for riscv64 -
all-x86_64
— All features that are compiled and tested for x86_64 -
all-armhf
— All features that are compiled and tested for armhf Note: This platform is deprecated and will be phased out. -
all-mingw64
— All features that are compiled and tested for mingw64 -
all-msvc64
— All features that are compiled and tested for msvc64 -
all-android
— All features that are compiled and tested for android builds
Modules§
- crosvm 🔒The root level module that includes the config and aggregate of the submodules for running said configs.
- sys 🔒
Enums§
- Exit code from crosvm,