MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / pause

Method pause

vmm/src/device_manager.rs:5569–5594  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

5567
5568impl Pausable for DeviceManager {
5569 fn pause(&mut self) -> result::Result<(), MigratableError> {
5570 for (_, device_node) in self.device_tree.lock().unwrap().iter() {
5571 if let Some(migratable) = &device_node.migratable {
5572 match migratable.lock().unwrap().pause() {
5573 Ok(()) => {}
5574 Err(MigratableError::DeviceDisconnected(id)) => {
5575 warn!("Skipping pause for disconnected device {id}");
5576 }
5577 Err(e) => return Err(e),
5578 }
5579 }
5580 }
5581 // On AArch64, the pause of device manager needs to trigger
5582 // a "pause" of GIC, which will flush the GIC pending tables
5583 // and ITS tables to guest RAM.
5584 #[cfg(target_arch = "aarch64")]
5585 {
5586 self.get_interrupt_controller()
5587 .unwrap()
5588 .lock()
5589 .unwrap()
5590 .pause()?;
5591 };
5592
5593 Ok(())
5594 }
5595
5596 fn resume(&mut self) -> result::Result<(), MigratableError> {
5597 for (_, device_node) in self.device_tree.lock().unwrap().iter() {

Callers

nothing calls this directly

Calls 2

iterMethod · 0.80

Tested by

no test coverage detected