File tree 1 file changed +7
-5
lines changed
src/vmm/src/device_manager 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -293,11 +293,6 @@ impl<'a> Persist<'a> for MMIODeviceManager {
293
293
. downcast_mut :: < Vsock < VsockUnixBackend > > ( )
294
294
. unwrap ( ) ;
295
295
296
- let vsock_state = VsockState {
297
- backend : vsock. backend ( ) . save ( ) ,
298
- frontend : vsock. save ( ) ,
299
- } ;
300
-
301
296
// Send Transport event to reset connections if device
302
297
// is activated.
303
298
if vsock. is_activated ( ) {
@@ -306,6 +301,13 @@ impl<'a> Persist<'a> for MMIODeviceManager {
306
301
} ) ;
307
302
}
308
303
304
+ // Save state after potential notification to the guest. This
305
+ // way we save changes to the queue the notification can cause.
306
+ let vsock_state = VsockState {
307
+ backend : vsock. backend ( ) . save ( ) ,
308
+ frontend : vsock. save ( ) ,
309
+ } ;
310
+
309
311
states. vsock_device = Some ( ConnectedVsockState {
310
312
device_id : devid. clone ( ) ,
311
313
device_state : vsock_state,
You can’t perform that action at this time.
0 commit comments