qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

replay: finish record/replay before closing the disks

After recent updates block devices cannot be closed on qemu exit.
This happens due to the block request polling when replay is not finished.
Therefore now we stop execution recording before closing the block devices.

Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>

authored by

Pavel Dovgalyuk and committed by
Kevin Wolf
ae25dccb c8aa7895

+3
+2
replay/replay.c
··· 385 385 g_free(replay_snapshot); 386 386 replay_snapshot = NULL; 387 387 388 + replay_mode = REPLAY_MODE_NONE; 389 + 388 390 replay_finish_events(); 389 391 } 390 392
+1
vl.c
··· 4524 4524 4525 4525 /* No more vcpu or device emulation activity beyond this point */ 4526 4526 vm_shutdown(); 4527 + replay_finish(); 4527 4528 4528 4529 job_cancel_sync_all(); 4529 4530 bdrv_close_all();