mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-28 17:44:10 +00:00
6a8fdd9f8e
This change adds the suspend and resume commands to crosvm, as well as corresponding VmRequest variants and VCPU loop support. When a request triggers a VmRunMode change, the Mutex guarded shared VmRunMode variable is mutated and the associated Condvar is notified. Each VCPU thread is interrupted to kick it out of the KVM_RUN call and checks the VmRunMode, If the VCPU was already suspended by waiting for the Condvar, the notify_all call will wake up the thread, upon which the VCPU thread can respond to the new mode. TEST=crosvm suspend/crosvm resume BUG=chromium:920875 Change-Id: Ibbeb748ab0d64402c7196890815e8e1cb4dfca38 Reviewed-on: https://chromium-review.googlesource.com/1416317 Commit-Ready: Zach Reizner <zachr@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Tested-by: Zach Reizner <zachr@chromium.org> Reviewed-by: Dylan Reid <dgreid@chromium.org> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |