virtio: video: build backends separately from the codec device

The current way for building a codec device is to call the corresponding
constructor method of the backend we want to use. However doing this
forces us to pass the resource bridge to these constructors, introducing
dependencies from the backend to parts of the code that are not used
otherwise.

Switch the construction method to one constructor per backend, which
only takes the arguments relevant to the backend, and one device
constructor that takes the backend to use as parameter.

BUG=b:161774071
BUG=b:169295147
TEST=Android Youtube plays properly on Hatch.

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