crosvm: return 32 exit code when guest issues reset request

Instead of returning 0 for both shutdown and reset/reboot, let's have
shutdown continue returning 0, but reset will now return 32 exit code,
so that callers will have an option to handle this case differently.

BUG=b:3169569
TEST=Examine crosvm exit codes when resetting and shutting down VM

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