mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-22 11:22:26 +00:00
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 <sebastien.boeuf@intel.com>
This commit is contained in:
parent
f6eeba781b
commit
86377127df
@ -1162,7 +1162,6 @@ impl Pausable for Vm {
|
|||||||
.valid_transition(new_state)
|
.valid_transition(new_state)
|
||||||
.map_err(|e| MigratableError::Resume(anyhow!("Invalid transition: {:?}", e)))?;
|
.map_err(|e| MigratableError::Resume(anyhow!("Invalid transition: {:?}", e)))?;
|
||||||
|
|
||||||
self.device_manager.lock().unwrap().resume()?;
|
|
||||||
self.cpu_manager.lock().unwrap().resume()?;
|
self.cpu_manager.lock().unwrap().resume()?;
|
||||||
#[cfg(target_arch = "x86_64")]
|
#[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.
|
// And we're back to the Running state.
|
||||||
*state = new_state;
|
*state = new_state;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user