@@ -357,6 +357,11 @@ impl DeviceManager {
357357 Self :: do_kick_device ( mmio_transport_locked. device ( ) ) ;
358358 Ok ( ( ) )
359359 } ) ;
360+ // Go through PCI VirtIO devices
361+ for device in self . pci_devices . virtio_devices . values ( ) {
362+ let virtio_device = device. lock ( ) . expect ( "Poisoned lock" ) . virtio_device ( ) ;
363+ Self :: do_kick_device ( virtio_device) ;
364+ }
360365 }
361366
362367 fn do_mark_virtio_queue_memory_dirty (
@@ -380,6 +385,12 @@ impl DeviceManager {
380385 Self :: do_mark_virtio_queue_memory_dirty ( mmio_transport_locked. device ( ) , mem) ;
381386 Ok ( ( ) )
382387 } ) ;
388+
389+ // Go through PCI VirtIO devices
390+ for device in self . pci_devices . virtio_devices . values ( ) {
391+ let virtio_device = device. lock ( ) . expect ( "Poisoned lock" ) . virtio_device ( ) ;
392+ Self :: do_mark_virtio_queue_memory_dirty ( virtio_device, mem) ;
393+ }
383394 }
384395}
385396
@@ -416,7 +427,7 @@ pub enum DevicePersistError {
416427
417428pub struct DeviceRestoreArgs < ' a > {
418429 pub mem : & ' a GuestMemoryMmap ,
419- pub vm : & ' a Vm ,
430+ pub vm : & ' a Arc < Vm > ,
420431 pub event_manager : & ' a mut EventManager ,
421432 pub vcpus_exit_evt : & ' a EventFd ,
422433 pub vm_resources : & ' a mut VmResources ,
@@ -491,6 +502,12 @@ impl<'a> Persist<'a> for DeviceManager {
491502 // Restore PCI devices
492503 let pci_ctor_args = PciDevicesConstructorArgs {
493504 resource_allocator : & resource_allocator,
505+ vm : constructor_args. vm . clone ( ) ,
506+ mem : constructor_args. mem ,
507+ vm_resources : constructor_args. vm_resources ,
508+ instance_id : constructor_args. instance_id ,
509+ restored_from_file : constructor_args. restored_from_file ,
510+ event_manager : constructor_args. event_manager ,
494511 } ;
495512 let pci_devices = PciDevices :: restore ( pci_ctor_args, & state. pci_state ) ?;
496513
0 commit comments