(&mut self)
| 1451 | } |
| 1452 | |
| 1453 | fn snapshot(&mut self) -> std::result::Result<Snapshot, MigratableError> { |
| 1454 | let mut vfio_common_snapshot = Snapshot::new_from_state(&self.state())?; |
| 1455 | |
| 1456 | // Snapshot PciConfiguration |
| 1457 | vfio_common_snapshot.add_snapshot(self.configuration.id(), self.configuration.snapshot()?); |
| 1458 | |
| 1459 | // Snapshot MSI |
| 1460 | if let Some(msi) = &mut self.interrupt.msi { |
| 1461 | vfio_common_snapshot.add_snapshot(msi.cfg.id(), msi.cfg.snapshot()?); |
| 1462 | } |
| 1463 | |
| 1464 | // Snapshot MSI-X |
| 1465 | if let Some(msix) = &mut self.interrupt.msix { |
| 1466 | vfio_common_snapshot.add_snapshot(msix.bar.id(), msix.bar.snapshot()?); |
| 1467 | } |
| 1468 | |
| 1469 | Ok(vfio_common_snapshot) |
| 1470 | } |
| 1471 | } |
| 1472 | |
| 1473 | /// VfioPciDevice represents a VFIO PCI device. |
nothing calls this directly
no test coverage detected