crosvm: fix build without --features=gpu

Add cfg checks to types that are only available when the gpu feature is
enabled. This fixes the `tools/presubmit --all` build.

BUG=None
TEST=cargo build --no-default-features
TEST=cargo build --no-default-features --features=gpu

Change-Id: Ibb6adb73f196dc798ba114cbae5e06e989a6e96d
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3993687
Auto-Submit: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Idan Raiter <idanr@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2 files changed
tree: 9537f9df1c43a2b2952b2588e933b0e37840ce9a
  1. .cargo/
  2. .devcontainer/
  3. .github/
  4. .vscode/
  5. aarch64/
  6. acpi_tables/
  7. anti_tamper/
  8. arch/
  9. argh_helpers/
  10. base/
  11. bit_field/
  12. broker_ipc/
  13. common/
  14. crash_report/
  15. cros_async/
  16. cros_fdt/
  17. cros_tracing/
  18. crosvm-fuzz/
  19. crosvm_cli/
  20. crosvm_control/
  21. crosvm_plugin/
  22. devices/
  23. disk/
  24. docs/
  25. fuse/
  26. gpu_display/
  27. hypervisor/
  28. infra/
  29. integration_tests/
  30. io_uring/
  31. kernel_cmdline/
  32. kernel_loader/
  33. kvm/
  34. kvm_sys/
  35. libcras_stub/
  36. linux_input_sys/
  37. logo/
  38. media/
  39. metrics/
  40. net_sys/
  41. net_util/
  42. power_monitor/
  43. prebuilts/
  44. protos/
  45. qcow_utils/
  46. resources/
  47. rutabaga_gfx/
  48. sandbox/
  49. seccomp/
  50. serde_keyvalue/
  51. src/
  52. system_api/
  53. tests/
  54. third_party/
  55. tools/
  56. tpm2/
  57. tpm2-sys/
  58. tube_transporter/
  59. usb_sys/
  60. usb_util/
  61. vfio_sys/
  62. vhost/
  63. virtio_sys/
  64. vm_control/
  65. vm_memory/
  66. win_audio/
  67. win_util/
  68. x86_64/
  69. .dockerignore
  70. .gitignore
  71. .gitmodules
  72. .rustfmt.toml
  73. ARCHITECTURE.md
  74. build.rs
  75. Cargo.lock
  76. Cargo.toml
  77. CONTRIBUTING.md
  78. DIR_METADATA
  79. LICENSE
  80. mypy.ini
  81. OWNERS
  82. PRESUBMIT.cfg
  83. pyproject.toml
  84. README.chromeos.md
  85. README.md
  86. rust-toolchain
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