crosvm/vm_control
Elie Kheirallah 5a91dd8d2b vm_control: sleep/wake devices when VM gets suspended/resumed
Currently commands Suspend and Resume to the VM will only sleep the
Vcpus but not devices. This results in a partial suspend/resume since
devices can still be running and potentially modifying the env (filling
up buffers, modifying variables). The aim of this CL is to put the
devices to sleep when the VM is put in suspended mode, and to wake the
devices when the VM goes back to resumed mode.
Added new flag to `suspend` and `resume` commands: `--full`
which does a full VM suspend.
Added new VmRequest: SuspendVm, ResumeVm.
Added suspend/resume test that also suspends/resumes devices, thus
doing a Full VM suspend/resume.
Also now tracking the state of devices before sleep, just like Vcpus

BUG=N/A
TEST=presubmit, e2e_tests
TEST=boot a VM, suspend, resume

Change-Id: Ia13fbdf7bb6765dd20bd3c67af5212e9c842b824
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4616827
Reviewed-by: Frederick Mayle <fmayle@google.com>
Commit-Queue: Elie Kheirallah <khei@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2023-06-27 19:31:41 +00:00
..
src vm_control: sleep/wake devices when VM gets suspended/resumed 2023-06-27 19:31:41 +00:00
Cargo.toml