devices: vhost-user: remove Arc from SlaveListener and SlaveReqHandler

The SlaveReqHandler should be the sole owner of a VhostUserBackend since
it calls its mutable methods, so we shouldn't need an Arc here. If
sharing is necessary users can use their own locking mechanism.

Single ownership will help to retrieve the backend after a client
disconnects, to reuse it for another connection if needed.

BUG=b:229554679
BUG=b:216407443
TEST=cargo test -p vmm_vhost
TEST=vhost-user console device works.
TEST=cargo test -p devices

Change-Id: I2358c807ac3ddb1ee4b29d97df0ade5a3e30a85a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3591108
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Richard Zhang <rizhang@google.com>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
9 files changed
tree: c0526b9da5e28ef1e4aeebcdf219e87cca03f0e6
  1. .cargo/
  2. .devcontainer/
  3. .github/
  4. aarch64/
  5. acpi_tables/
  6. arch/
  7. base/
  8. bin/
  9. bit_field/
  10. ci/
  11. common/
  12. cros_async/
  13. crosvm-fuzz/
  14. crosvm_control/
  15. crosvm_plugin/
  16. devices/
  17. disk/
  18. docs/
  19. fuse/
  20. gpu_display/
  21. hypervisor/
  22. infra/
  23. integration_tests/
  24. io_uring/
  25. kernel_cmdline/
  26. kernel_loader/
  27. kvm/
  28. kvm_sys/
  29. libcras_stub/
  30. linux_input_sys/
  31. logo/
  32. media/
  33. metrics/
  34. net_sys/
  35. net_util/
  36. power_monitor/
  37. protos/
  38. qcow_utils/
  39. resources/
  40. rutabaga_gfx/
  41. seccomp/
  42. serde_keyvalue/
  43. src/
  44. system_api_stub/
  45. tests/
  46. third_party/
  47. tools/
  48. tpm2/
  49. tpm2-sys/
  50. tube_transporter/
  51. usb_sys/
  52. usb_util/
  53. vfio_sys/
  54. vhost/
  55. virtio_sys/
  56. vm_control/
  57. vm_memory/
  58. win_util/
  59. x86_64/
  60. .dockerignore
  61. .gitignore
  62. .gitmodules
  63. .rustfmt.toml
  64. ARCHITECTURE.md
  65. Cargo.toml
  66. CONTRIBUTING.md
  67. LICENSE
  68. navbar.md
  69. OWNERS
  70. PRESUBMIT.cfg
  71. README.chromeos.md
  72. README.md
  73. run_tests
  74. rust-toolchain
  75. setup_cros_cargo.sh
  76. test_all
  77. unblocked_terms.txt
README.md

crosvm - The Chrome OS 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 Chrome OS 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 Chrome OS devices.

Logo