linux.rs: replace Error enum with anyhow

Use the anyhow crate to provide ad-hoc errors with context. This removes
the large, manually-updated enum, which we never use programmatically
anyway (error messages are printed in human-readable form and otherwise
not matched against).

BUG=b:190433480
TEST=cargo build
TEST=./test_all

Change-Id: Ia7b90b33774d4031054b346d650861d3105044ee
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3105436
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
6 files changed
tree: fb443a864d37a458f08d48de89757c4f36d3bdbd
  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