Revert "rutabaga_gfx: remove fence polling and enable async callback"

This reverts commit a999284da2f8c6d3ef8667e557e27fd27ee29a06.

This also introduces two extra `use` statements to fix the corresponding
errors in the LUCI build, which did not occur in local builds.

Reason for revert: caused deadlock in virglrenderer

Original change's description:
> rutabaga_gfx: remove fence polling and enable async callback
>
> Now that rutabaga users can provide a callback for fence
> completion, fences no longer need to be polled on the main thread.
>
> Optional polling still occurs for Rutabaga Components that still
> rely on it for other purposes (e.g. virglrenderer for GL query
> checking).
>
> Also, use a BTreeMap rather a HashMap since we only expect a dozen
> or so entries at most.  In such cases, a BTreeMap is faster.
>
> * v1 (lfrb@collabora.com): remove all polling + add async_cb
> * v2 (ryanneph@google.com): re-introduce optional polling to fix
>       virglrenderer that relies on it for GL query checking.
> * v3 (ryanneph@google.com): replace timer-based polling with
>       eventfd-based poll() signaling for components that want to
>       use it.
>
> BUG=b:175527587
> TEST=glxgears and vkcube in a crosvm guest VM.
>
> Cq-Depend: chromium:3555854, chromium:3563893
> Change-Id: I8e0181317e954cd15e2b8dc04c9b1329b0a6e182
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2860746
> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
> Tested-by: kokoro <noreply+kokoro@google.com>
> Commit-Queue: Ryan Neph <ryanneph@google.com>

BUG=b:175527587,b:228782431,b:228521246
TEST=arc.Notification.vm on kukui-arc-r
TEST=dEQP-VK.wsi.android.swapchain.create#image_usage on dedede/kukui-arc-r

Change-Id: I616e3f283a60fe6a260f796cddce67c548b5e304
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3584076
Reviewed-by: Kazuhiro Inaba <kinaba@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Ryan Neph <ryanneph@google.com>
9 files changed
tree: 870732acaecba42c33a51b4a84e683899f6a4dbb
  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. net_sys/
  34. net_util/
  35. power_monitor/
  36. protos/
  37. qcow_utils/
  38. resources/
  39. rutabaga_gfx/
  40. seccomp/
  41. serde_keyvalue/
  42. src/
  43. system_api_stub/
  44. tests/
  45. third_party/
  46. tools/
  47. tpm2/
  48. tpm2-sys/
  49. usb_sys/
  50. usb_util/
  51. vfio_sys/
  52. vhost/
  53. virtio_sys/
  54. vm_control/
  55. vm_memory/
  56. win_util/
  57. x86_64/
  58. .dockerignore
  59. .gitignore
  60. .gitmodules
  61. .rustfmt.toml
  62. ARCHITECTURE.md
  63. Cargo.toml
  64. CONTRIBUTING.md
  65. LICENSE
  66. navbar.md
  67. OWNERS
  68. README.chromeos.md
  69. README.md
  70. run_tests
  71. rust-toolchain
  72. setup_cros_cargo.sh
  73. test_all
  74. 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