Clone this repo:
  1. 7c95b4a rust-vmm/vhost: switch to upstream tempfile by Daniel Verkamp · 8 months ago factory-14778.B factory-ambassador-14265.B factory-brya-14517.B factory-cherry-14455.B factory-firmware-ti50-guc-14778.B factory-guybrush-14600.B factory-kukui-14374.B firmware-brya-14505.B firmware-chameleon-14280.B firmware-cherry-14454.B firmware-cr50-stab-14294.B firmware-cr50-stab-mp-14300.B firmware-guybrush-14500.B main release-R100-14526.B release-R101-14588.B release-R102-14695.B release-R103-14816.B release-R96-14268.B release-R97-14324.B release-R98-14388.B release-R99-14469.B stabilize-14249.B stabilize-14267.B stabilize-14268.51.B stabilize-14268.52.B stabilize-14268.67.B stabilize-14285.B stabilize-14312.B stabilize-14321.B stabilize-14324.13.B stabilize-14324.41.B stabilize-14324.62.B stabilize-14324.72.B stabilize-14333.B stabilize-14336.B stabilize-14345.B stabilize-14385.B stabilize-14388.52.B stabilize-14388.61.B stabilize-14388.62.B stabilize-14395.B stabilize-14396.B stabilize-14411.B stabilize-14438.B stabilize-14442.B stabilize-14469.41.B stabilize-14469.58.B stabilize-14469.8.B stabilize-14469.9.B stabilize-14477.B stabilize-14496.B stabilize-14498.B stabilize-14526.57.B stabilize-14526.67.B stabilize-14526.73.B stabilize-14526.84.B stabilize-14526.89.B stabilize-14528.B stabilize-14532.B stabilize-14536.B stabilize-14588.14.B stabilize-14588.98.B stabilize-14589.B stabilize-14616.B stabilize-14633.B stabilize-14682.B stabilize-14771.B stabilize-14790.B stabilize-14803.B stabilize-14839.B stabilize-ambassador-14268.43.B stabilize-quickfix-14526.91.B stabilize-voshyr-14637.B stabilize-wristpin-14469.59.B
  2. d65bd28 CHROMIUM: Use File for device request fd by Chirantan Ekbote · 9 months ago stabilize-14217.B stabilize-14235.B stabilize-14238.B stabilize-rust-14220.B stabilize-rust-14224.B stabilize-rust-14225.B
  3. 02f8b00 Merge remote-tracking branch 'upstream/master' into HEAD by Daniel Verkamp · 9 months ago
  4. fff997d Update crosvm deps to use patch.crates-io for paths by Dennis Kempin · 10 months ago factory-14162.B factory-keeby-14162.B release-R94-14150.B stabilize-14149.B stabilize-14150.376.B stabilize-14150.43.B stabilize-14150.64.B stabilize-14150.74.B stabilize-14151.B stabilize-14163.B stabilize-14178.B stabilize-14179.B stabilize-14189.B
  5. 488b3ad fix warning: unaligned_references by wanglei01 · 10 months ago


A pure rust library for vDPA, vhost and vhost-user.

The vhost crate aims to help implementing dataplane for virtio backend drivers. It supports three different types of dataplane drivers:

  • vhost: the dataplane is implemented by linux kernel
  • vhost-user: the dataplane is implemented by dedicated vhost-user servers
  • vDPA(vhost DataPath Accelerator): the dataplane is implemented by hardwares

The main relationship among Traits and Structs exported by the vhost crate is as below:

vhost Architecture

Kernel-based vHost Backend Drivers

The vhost drivers in Linux provide in-kernel virtio device emulation. Normally the hypervisor userspace process emulates I/O accesses from the guest. Vhost puts virtio emulation code into the kernel, taking hypervisor userspace out of the picture. This allows device emulation code to directly call into kernel subsystems instead of performing system calls from userspace. The hypervisor relies on ioctl based interfaces to control those in-kernel vhost drivers, such as vhost-net, vhost-scsi and vhost-vsock etc.

vHost-user Backend Drivers

The vhost-user protocol aims to implement vhost backend drivers in userspace, which complements the ioctl interface used to control the vhost implementation in the Linux kernel. It implements the control plane needed to establish virtqueue sharing with a user space process on the same host. It uses communication over a Unix domain socket to share file descriptors in the ancillary data of the message.

The protocol defines two sides of the communication, master and slave. Master is the application that shares its virtqueues, slave is the consumer of the virtqueues. Master and slave can be either a client (i.e. connecting) or server (listening) in the socket communication.