commit | 3fedfd337f674df5a233ef990f73f3606789fd4d | [log] [tgz] |
---|---|---|
author | Frederick Mayle <fmayle@google.com> | Fri May 10 12:47:55 2024 -0700 |
committer | Frederick Mayle <fmayle@google.com> | Fri May 10 15:00:34 2024 -0700 |
tree | 4a8d3b73cb182de0d2ecfde18ab8782ee3d392ce | |
parent | 1dee6d0d245ef1c4ce6748a7aef657da4a0547cd [diff] |
UPSTREAM: crosvm: snapshot-restore support for kvm clock When kvm clock is available, Linux (6.1 at least) uses it for the scheduling clock (among other things) even when the TSC is configured as the primary clock source. When restoring a VM, if we don't make a KVM_SET_CLOCK call, kvm clock's value will rollback to zero and cause trouble. `ClockState::flags` was deleted because it had no existing uses, it isn't useable in any hypervisor generic way, and because it will result in incorrect behavior for snapshotting. The set of valid flags returned by KVM_GET_CLOCK is not the same as the set of valid flags that can be passed to KVM_SET_CLOCK. Test: snapshot and restore CF Bug: 339527192 Change-Id: I57503e72499a44e98e0c6ca93eb8cb01cb21c16d Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5530677 Reviewed-by: Elie Kheirallah <khei@google.com> Commit-Queue: Frederick Mayle <fmayle@google.com>
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.