From 86377127df037c9f76b82ba6dabd429e1b1ba863 Mon Sep 17 00:00:00 2001 From: Sebastien Boeuf Date: Thu, 25 Jun 2020 09:58:13 +0200 Subject: [PATCH] vmm: Resume devices after vCPUs have been resumed Because we don't want the guest to miss any event triggered by the emulation of devices, it is important to resume all vCPUs before we can resume the DeviceManager with all its associated devices. Signed-off-by: Sebastien Boeuf --- vmm/src/vm.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vmm/src/vm.rs b/vmm/src/vm.rs index 0338988e7..6e155ecf7 100644 --- a/vmm/src/vm.rs +++ b/vmm/src/vm.rs @@ -1162,7 +1162,6 @@ impl Pausable for Vm { .valid_transition(new_state) .map_err(|e| MigratableError::Resume(anyhow!("Invalid transition: {:?}", e)))?; - self.device_manager.lock().unwrap().resume()?; self.cpu_manager.lock().unwrap().resume()?; #[cfg(target_arch = "x86_64")] { @@ -1172,6 +1171,7 @@ impl Pausable for Vm { })?; } } + self.device_manager.lock().unwrap().resume()?; // And we're back to the Running state. *state = new_state;