summaryrefslogtreecommitdiffstats
path: root/vl.c
diff options
context:
space:
mode:
authorPeter Maydell2018-03-09 18:28:16 +0100
committerPeter Maydell2018-03-09 18:28:16 +0100
commite4ae62b802cec437f877f2cadc4ef059cc0eca76 (patch)
treec2bc14150ecdcb996bcd4ce19728985034e1425b /vl.c
parentmemory: fix flatview_access_valid RCU read lock/unlock imbalance (diff)
parentvl: introduce vm_shutdown() (diff)
downloadqemu-e4ae62b802cec437f877f2cadc4ef059cc0eca76.tar.gz
qemu-e4ae62b802cec437f877f2cadc4ef059cc0eca76.tar.xz
qemu-e4ae62b802cec437f877f2cadc4ef059cc0eca76.zip
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
# gpg: Signature made Fri 09 Mar 2018 13:19:02 GMT # gpg: using RSA key 9CA4ABB381AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8 * remotes/stefanha/tags/block-pull-request: vl: introduce vm_shutdown() virtio-scsi: fix race between .ioeventfd_stop() and vq handler virtio-blk: fix race between .ioeventfd_stop() and vq handler block: add aio_wait_bh_oneshot() virtio-blk: dataplane: Don't batch notifications if EVENT_IDX is present README: Fix typo 'git-publish' block: Fix qemu crash when using scsi-block Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/vl.c b/vl.c
index dae986b352..3ef04ce991 100644
--- a/vl.c
+++ b/vl.c
@@ -4722,17 +4722,10 @@ int main(int argc, char **argv, char **envp)
os_setup_post();
main_loop();
- replay_disable_events();
-
- /* The ordering of the following is delicate. Stop vcpus to prevent new
- * I/O requests being queued by the guest. Then stop IOThreads (this
- * includes a drain operation and completes all request processing). At
- * this point emulated devices are still associated with their IOThreads
- * (if any) but no longer have any work to do. Only then can we close
- * block devices safely because we know there is no more I/O coming.
- */
- pause_all_vcpus();
- iothread_stop_all();
+
+ /* No more vcpu or device emulation activity beyond this point */
+ vm_shutdown();
+
bdrv_close_all();
res_free();