Virtio Interfaces

There are three components to having a working virtio interface. They are:

  1. A specification, preferably documented in the upstream OASIS VIRTIO specification
  2. A device driver, usually in an OS kernel like Linux*
    1. this is sometimes referred to as a front-end
  3. A device implementation
    1. this is sometimes referred to as a back-end
    2. often this is part of the hypervisor or Virtual Machine Monitor (VMM)

Project Stratos mostly focuses on working with existing specifications either already in the released version of the spec or already accepted into the working draft of the next version. Some of the Project Stratos works to support restricted memory views may also result in new proposals for VIRTIO transports which will also be submitted for inclusion in the specification.

While Linux already has a large number of virtio devices will be directly accessible to a Linux kernel. For example, the RPMB device isn't exposed directly to a kernel but to a secure layer of the firmware which then provides a secure storage facility to the OS.

Generally, the backend of a VIRTIO device is either part of the hypervisor, or it's associated Virtual Machine Monitor. One of the main goals of Stratos is to achieve as much re-use as possible across multiple hypervisors. The principle approach to this is by implementing each backend as a standalone vhost-user daemon. The details of setting up the memory mapping and initial configuration of the hypervisor can be left to a VMM or stub launcher, and the actual device emulation is achieved with simple POSIX semantics. We are also investigating using Rust-vmm as a portable safe backend for these devices.

Who is working on the interface?


Interface

Worked on by?

Cuttlefish, Android Studio Emulator

Comments 

virtio-block
criticalused for all storage volumes.
virtio-fs
debug used for file sharing between host and guest - we use the fuse+dax version, not the older 9p version. 
virtio-console
critical used for logcat, kernel logging, serial console, other HAL services with simple protocols. 

virtio-RPMB

Linaro

no interest

virtio--SPI


early interestpart of the virtio-greybus
virtiosock
criticalthis is used for experiments and anything without a proper virtio interface, but we are trying to reduce use of it.
virtio-rng
criticalneeded to run on some processors without good RNG instructions. critical.
virtio-pmem
criticalused for Restore-On-Reboot in Android R. We also hope to move Android 'pstore' to use it, but it needs work. 
virtio-net
critical

used for mobile data, wireless and ethernet connectivity.

virtio-input
optional UX interactions only.used for touchscreen, keyboard, multi-touch support (being added to crosvm upstream right now). 

virtio-SCMI

Linaro,

no interest
virtio-balloon
no plans to use
virtio-tpm
no plans to use
virtio-scmi
no interest
virtio-wl
no plans to use

virtio-camera


early interest
virtio-mac80211
consideringcuttlefish comment or a new "virtio-wifi" - we need a more feature-rich virtio backend for wifi. Currently we stack virt_wifi (upstreamed driver from Google) on top of virtio_net to provide nl80211 to Android, but we need features like P2P, AP mode, wifi transfer. We have just started to explore this.
virtio-sndOpenSynergyconsideringthis was pushed upstream by OpenSynergy and is being used by COQOS. We are adding support for it to crosvm right now, and hope to use it soon.
virtio-vdecChromeconsideringthis was pushed upstream by Chrome and is being used by ARC-VM. It enables offload of video decoding to the host. Currently, we don't support that feature, but we want to explore it for Android.

virtio-can



second priority because controlled by a safe OS.

virtio-tuner




virtio-i2c

Linaro

early interestpart of the virtio-greybus

virtio-Wayland

google?



virtio-video



What does it include.
virtio-vehicle


virtio-radio


virtio-argo


virtio-gpio
early interest
virtio-gpu
optional

This is interesting to LDCG for AI purposes

cuttlefish  are running an experimental version with "blob" support. optional, without it we can use SwiftShader and render in software to shared memory

virtio-watchdogLinaro (LEDGE and LDCG)interested for debug
virtio-greybusLinaro should do. Not sure whom yetearly interestencompasses i2c, SPI and GPIO
trustzone / TPM virtio interface

will need investigation
vmm control of CPUs not under the control for the hypervisor



Specification exists

InterfaceSpecificationComment
virtio-RPMB1.2
virtio--SPI

virtio-SCMI

virtio-camera

virtio-can

virtio-tuner

virtio-i2c

virtio-Wayland

virtio-video

virtio-vehicle

virtio-radio

virtio-net

1.2neet investigation by LDCG to determine suitability for use cases

Block/SCSI

1.2

Console

1.2

Entropy

1.2

Memory balloon

1.2

GPU 2d/3d

1.2

Input

1.2

Crypto

1.2

Socket

1.2

FS

1.2

IOMMU

1.2

Snd

1.2

Memory

1.2