vhost-user: Implement restore in device process

* Creates a RESTORE message that the vmm sends to the device
* Starts up the worker on the vhost user VMM side if the device is
  activated
* Rewires up irqfds and doorbell events (ie. queue_evts)
* Restore vrings on the device process side
* Log error from restoring devices, which will making debugging
  e2e_tests easier

Unlike non-vhost user virtio devices, vhost user devices won't have
their queues and fds rewired on "wake". Instead it will happen on
"restore".

BUG=b:280607404
TEST=e2e_tests snapshot_vhost_user pass. presubmits

Change-Id: I0221dff1448e33d8b82bda48a151f94f90c691d4
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4618095
Commit-Queue: Richard Zhang <rizhang@google.com>
Reviewed-by: Frederick Mayle <fmayle@google.com>
14 files changed
tree: cebac90e5b6de576aa78de13b226145f6c3da9cb
  1. .cargo/
  2. .config/
  3. .devcontainer/
  4. .github/
  5. .vscode/
  6. aarch64/
  7. acpi_tables/
  8. arch/
  9. argh_helpers/
  10. audio_util/
  11. base/
  12. bit_field/
  13. broker_ipc/
  14. common/
  15. cros_async/
  16. cros_fdt/
  17. cros_tracing/
  18. cros_tracing_types/
  19. crosvm_cli/
  20. crosvm_control/
  21. crosvm_plugin/
  22. devices/
  23. disk/
  24. docs/
  25. e2e_tests/
  26. fuse/
  27. fuzz/
  28. gpu_display/
  29. hypervisor/
  30. infra/
  31. io_uring/
  32. jail/
  33. kernel_cmdline/
  34. kernel_loader/
  35. kvm/
  36. kvm_sys/
  37. libcras_stub/
  38. linux_input_sys/
  39. logo/
  40. media/
  41. metrics/
  42. net_sys/
  43. net_util/
  44. perfetto/
  45. power_monitor/
  46. prebuilts/
  47. proto_build_tools/
  48. protos/
  49. qcow_utils/
  50. resources/
  51. riscv64/
  52. rutabaga_gfx/
  53. sandbox/
  54. serde_keyvalue/
  55. src/
  56. swap/
  57. system_api/
  58. tests/
  59. third_party/
  60. tools/
  61. tpm2/
  62. tpm2-sys/
  63. tube_transporter/
  64. usb_sys/
  65. usb_util/
  66. vendor/
  67. vfio_sys/
  68. vhost/
  69. virtio_sys/
  70. vm_control/
  71. vm_memory/
  72. win_audio/
  73. win_util/
  74. x86_64/
  75. .dockerignore
  76. .envrc
  77. .gitignore
  78. .gitmodules
  79. .rustfmt.toml
  80. ARCHITECTURE.md
  81. Cargo.lock
  82. Cargo.toml
  83. CONTRIBUTING.md
  84. DIR_METADATA
  85. LICENSE
  86. mypy.ini
  87. OWNERS
  88. OWNERS_COUNCIL
  89. PRESUBMIT.cfg
  90. pyproject.toml
  91. README.chromeos.md
  92. README.md
  93. rust-toolchain
README.md

crosvm - The ChromeOS Virtual Machine Monitor

crosvm is a virtual machine monitor (VMM) based on Linux’s KVM hypervisor, with a focus on simplicity, security, and speed. crosvm is intended to run Linux guests, originally as a security boundary for running native applications on the ChromeOS platform. Compared to QEMU, crosvm doesn’t emulate architectures or real hardware, instead concentrating on paravirtualized devices, such as the virtio standard.

crosvm is currently used to run Linux/Android guests on ChromeOS devices.

Logo