From 96209e7a16529c0d4403fd290238b67a51a8b253 Mon Sep 17 00:00:00 2001 From: Bo Chen Date: Fri, 14 Oct 2022 12:04:44 -0700 Subject: [PATCH] vmm: Remove the explicit call to 'Snapshottable:restore()' The restore path of MemoryManager is handled specially without implementing a `Snapshottable:restore()`. Removing the explicit call to it along the migration code path to avoid confusions. See: #4783 Signed-off-by: Bo Chen --- vmm/src/vm.rs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/vmm/src/vm.rs b/vmm/src/vm.rs index 0ba7d35b5..05ad4d9f6 100644 --- a/vmm/src/vm.rs +++ b/vmm/src/vm.rs @@ -2769,17 +2769,6 @@ impl Snapshottable for Vm { self.load_clock_from_snapshot(&snapshot) .map_err(|e| MigratableError::Restore(anyhow!("Error restoring clock: {:?}", e)))?; - if let Some(memory_manager_snapshot) = snapshot.snapshots.get(MEMORY_MANAGER_SNAPSHOT_ID) { - self.memory_manager - .lock() - .unwrap() - .restore(*memory_manager_snapshot.clone())?; - } else { - return Err(MigratableError::Restore(anyhow!( - "Missing memory manager snapshot" - ))); - } - if let Some(device_manager_snapshot) = snapshot.snapshots.get(DEVICE_MANAGER_SNAPSHOT_ID) { self.device_manager .lock()