.args_type = "",
.params = "",
.help = "stop emulation",
- .user_print = monitor_user_noop,
- .mhandler.cmd_new = do_stop,
+ .mhandler.cmd = hmp_stop,
},
STEXI
monitor_suspend(mon);
qmp_quit(NULL);
}
+
+void hmp_stop(Monitor *mon, const QDict *qdict)
+{
+ qmp_stop(NULL);
+}
void hmp_info_uuid(Monitor *mon);
void hmp_info_chardev(Monitor *mon);
void hmp_quit(Monitor *mon, const QDict *qdict);
+void hmp_stop(Monitor *mon, const QDict *qdict);
#endif
}
}
-/**
- * do_stop(): Stop VM execution
- */
-static int do_stop(Monitor *mon, const QDict *qdict, QObject **ret_data)
-{
- vm_stop(RUN_STATE_PAUSED);
- return 0;
-}
-
static void encrypted_bdrv_it(void *opaque, BlockDriverState *bs);
struct bdrv_iterate_context {
# Since: 0.14.0
##
{ 'command': 'quit' }
+
+##
+# @stop:
+#
+# Stop all guest VCPU execution.
+#
+# Since: 0.14.0
+#
+# Notes: This function will succeed even if the guest is already in the stopped
+# state
+##
+{ 'command': 'stop' }
{
.name = "stop",
.args_type = "",
- .params = "",
- .help = "stop emulation",
- .user_print = monitor_user_noop,
- .mhandler.cmd_new = do_stop,
+ .mhandler.cmd_new = qmp_marshal_input_stop,
},
SQMP
qemu_system_shutdown_request();
}
+void qmp_stop(Error **errp)
+{
+ vm_stop(RUN_STATE_PAUSED);
+}
+