CHERRY-PICK: hypervisor: x86: kvm: change TSC once during restore

Initially, time was not being restored in the VM unless we restore the
offset. This was possibly due to a different bug, where we weren't
restoring all the MSRs.
https://chromium.googlesource.com/crosvm/crosvm/+/5441c064e55179d69507c98cceac1750830fa60e

Bug:327278462
Test: boot crosvm. snapshot. restore. check time of VM == time of snapshot.
Test: boot CF, snapshot CF. Restore CF.

Change-Id: I2d4b6d7beba6c40fd37635b5f108559f65c6dd9f
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5492298
Reviewed-by: Steven Moreland <smoreland@google.com>
Auto-Submit: Elie Kheirallah <khei@google.com>
Reviewed-by: Frederick Mayle <fmayle@google.com>
Commit-Queue: Elie Kheirallah <khei@google.com>
1 file changed
tree: 79aad1f950ad997b327087f977dbbed2e30f3fd3
  1. .cargo/
  2. .config/
  3. .devcontainer/
  4. .github/
  5. .vscode/
  6. aarch64/
  7. acpi_tables/
  8. arch/
  9. argh_helpers/
  10. audio_streams_conformance_test/
  11. audio_util/
  12. base/
  13. bit_field/
  14. broker_ipc/
  15. common/
  16. cros_async/
  17. cros_fdt/
  18. cros_tracing/
  19. cros_tracing_types/
  20. crosvm_cli/
  21. crosvm_control/
  22. crosvm_plugin/
  23. cuttlefish/
  24. devices/
  25. disk/
  26. docs/
  27. e2e_tests/
  28. fuse/
  29. fuzz/
  30. gpu_display/
  31. hypervisor/
  32. infra/
  33. io_uring/
  34. jail/
  35. kernel_cmdline/
  36. kernel_loader/
  37. kvm/
  38. kvm_sys/
  39. libcras_stub/
  40. linux_input_sys/
  41. logo/
  42. media/
  43. metrics/
  44. metrics_events/
  45. net_sys/
  46. net_util/
  47. patches/
  48. perfetto/
  49. power_monitor/
  50. prebuilts/
  51. proto_build_tools/
  52. protos/
  53. resources/
  54. riscv64/
  55. rutabaga_gfx/
  56. sandbox/
  57. serde_keyvalue/
  58. src/
  59. swap/
  60. system_api/
  61. tests/
  62. third_party/
  63. tools/
  64. tube_transporter/
  65. usb_sys/
  66. usb_util/
  67. vendor/
  68. vfio_sys/
  69. vhost/
  70. virtio_sys/
  71. vm_control/
  72. vm_memory/
  73. win_audio/
  74. win_util/
  75. x86_64/
  76. .dockerignore
  77. .envrc
  78. .gitattributes
  79. .gitignore
  80. .rustfmt.toml
  81. android-fork-stats.sh
  82. android-merge-1-setup.sh
  83. android-merge-2-cargo-embargo.sh
  84. Android.bp
  85. ARCHITECTURE.md
  86. Cargo.lock
  87. Cargo.toml
  88. cargo2android_defaults.bp
  89. cargo2android_module.bp.patch
  90. cargo_embargo.json
  91. CONTRIBUTING.md
  92. DIR_METADATA
  93. LICENSE
  94. METADATA
  95. mypy.ini
  96. OWNERS
  97. OWNERS.android
  98. OWNERS_COUNCIL
  99. PRESUBMIT.cfg
  100. PREUPLOAD.cfg
  101. pyproject.toml
  102. README.chromeos.md
  103. README.md
  104. rust-toolchain
  105. TEST_MAPPING
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