mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-03-20 07:58:55 +00:00
vmm: Finalize migration support for all devices
Make sure the DeviceManager is triggered for all migration operations. The dirty pages are merged from MemoryManager and DeviceManager before to be sent up to the Vmm in lib.rs. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
parent
0411064271
commit
5c6139bbff
@ -2525,15 +2525,20 @@ impl Transportable for Vm {
|
||||
|
||||
impl Migratable for Vm {
|
||||
fn start_dirty_log(&mut self) -> std::result::Result<(), MigratableError> {
|
||||
self.memory_manager.lock().unwrap().start_dirty_log()
|
||||
self.memory_manager.lock().unwrap().start_dirty_log()?;
|
||||
self.device_manager.lock().unwrap().start_dirty_log()
|
||||
}
|
||||
|
||||
fn stop_dirty_log(&mut self) -> std::result::Result<(), MigratableError> {
|
||||
self.memory_manager.lock().unwrap().stop_dirty_log()
|
||||
self.memory_manager.lock().unwrap().stop_dirty_log()?;
|
||||
self.device_manager.lock().unwrap().stop_dirty_log()
|
||||
}
|
||||
|
||||
fn dirty_log(&mut self) -> std::result::Result<MemoryRangeTable, MigratableError> {
|
||||
self.memory_manager.lock().unwrap().dirty_log()
|
||||
Ok(MemoryRangeTable::new_from_tables(vec![
|
||||
self.memory_manager.lock().unwrap().dirty_log()?,
|
||||
self.device_manager.lock().unwrap().dirty_log()?,
|
||||
]))
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user