devices: virtio_pci_device: restore fix

Restore right now tries to restore interrupts at all times. If the
device was not previously activated, the interrupt will always be null
which will cause the restore to always fail. Add a check to see if the
device was previously activated before restoring the interrupt.

BUG=N/A
Test=presubmit

Change-Id: Ifddc27f2a63bab7b1509b934a9c14d129977a401
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4610691
Reviewed-by: Richard Zhang <rizhang@google.com>
Commit-Queue: Elie Kheirallah <khei@google.com>
Reviewed-by: Frederick Mayle <fmayle@google.com>
1 file changed
tree: 1fff93c817a33d04a1bd83ecf9013b236aacaf6c
  1. .cargo/
  2. .config/
  3. .devcontainer/
  4. .github/
  5. .vscode/
  6. aarch64/
  7. acpi_tables/
  8. arch/
  9. argh_helpers/
  10. audio_util/
  11. base/
  12. bit_field/
  13. broker_ipc/
  14. common/
  15. cros_async/
  16. cros_fdt/
  17. cros_tracing/
  18. cros_tracing_types/
  19. crosvm_cli/
  20. crosvm_control/
  21. crosvm_plugin/
  22. devices/
  23. disk/
  24. docs/
  25. e2e_tests/
  26. fuse/
  27. fuzz/
  28. gpu_display/
  29. hypervisor/
  30. infra/
  31. io_uring/
  32. jail/
  33. kernel_cmdline/
  34. kernel_loader/
  35. kvm/
  36. kvm_sys/
  37. libcras_stub/
  38. linux_input_sys/
  39. logo/
  40. media/
  41. metrics/
  42. net_sys/
  43. net_util/
  44. perfetto/
  45. power_monitor/
  46. prebuilts/
  47. proto_build_tools/
  48. protos/
  49. qcow_utils/
  50. resources/
  51. riscv64/
  52. rutabaga_gfx/
  53. sandbox/
  54. serde_keyvalue/
  55. src/
  56. swap/
  57. system_api/
  58. tests/
  59. third_party/
  60. tools/
  61. tpm2/
  62. tpm2-sys/
  63. tube_transporter/
  64. usb_sys/
  65. usb_util/
  66. vendor/
  67. vfio_sys/
  68. vhost/
  69. virtio_sys/
  70. vm_control/
  71. vm_memory/
  72. win_audio/
  73. win_util/
  74. x86_64/
  75. .dockerignore
  76. .envrc
  77. .gitignore
  78. .gitmodules
  79. .rustfmt.toml
  80. ARCHITECTURE.md
  81. Cargo.lock
  82. Cargo.toml
  83. CONTRIBUTING.md
  84. DIR_METADATA
  85. LICENSE
  86. mypy.ini
  87. OWNERS
  88. OWNERS_COUNCIL
  89. PRESUBMIT.cfg
  90. pyproject.toml
  91. README.chromeos.md
  92. README.md
  93. rust-toolchain
README.md

crosvm - The ChromeOS 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 ChromeOS 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 ChromeOS devices.

Logo