Implement virtio-vsock

Implement the virtual sockets device using vhost subsystem of the host
kernel to handle data transfer.

BUG=chromium:708267
TEST=build and run maitred in guest VM without issue

Change-Id: I35b542c0fc7e0fd9296f7ba3e1dfce60bf524d15
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/638838
Reviewed-by: Stephen Barber <smbarber@chromium.org>
9 files changed
tree: be3a916b0991914a841ef51cbc487e07dacacf89
  1. data_model/
  2. io_jail/
  3. kernel_loader/
  4. kvm/
  5. kvm_sys/
  6. net_sys/
  7. net_util/
  8. seccomp/
  9. src/
  10. sys_util/
  11. syscall_defines/
  12. vhost/
  13. virtio_sys/
  14. x86_64/
  15. .gitignore
  16. build_test.py
  17. Cargo.toml
  18. LICENSE
  19. README.md
README.md

Chrome OS KVM

This component, known as crosvm, runs untrusted operating systems along with virtualized devices. No actual hardware is emulated. This only runs VMs through the Linux's KVM interface. What makes crosvm unique is a focus on safety within the programming language and a sandbox around the virtual devices to protect the kernel from attack in case of an exploit in the devices.

Overview

The crosvm source code is organized into crates, each with their own unit tests. These crates are:

  • kernel_loader Loads elf64 kernel files to a slice of memory.
  • kvm_sys low-level (mostly) auto-generated structures and constants for using KVM
  • kvm unsafe, low-level wrapper code for using kvm_sys
  • crosvm the top-level binary front-end for using crosvm
  • x86_64 Support code specific to 64 bit intel machines.

Usage

Currently there is no front-end, so the best you can do is run cargo test in each crate.