提交 5f158f21 编写于 作者: L Luiz Capitulino

qapi: Convert stop

Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
上级 7a7f325e
...@@ -290,8 +290,7 @@ ETEXI ...@@ -290,8 +290,7 @@ ETEXI
.args_type = "", .args_type = "",
.params = "", .params = "",
.help = "stop emulation", .help = "stop emulation",
.user_print = monitor_user_noop, .mhandler.cmd = hmp_stop,
.mhandler.cmd_new = do_stop,
}, },
STEXI STEXI
......
...@@ -99,3 +99,8 @@ void hmp_quit(Monitor *mon, const QDict *qdict) ...@@ -99,3 +99,8 @@ void hmp_quit(Monitor *mon, const QDict *qdict)
monitor_suspend(mon); monitor_suspend(mon);
qmp_quit(NULL); qmp_quit(NULL);
} }
void hmp_stop(Monitor *mon, const QDict *qdict)
{
qmp_stop(NULL);
}
...@@ -24,5 +24,6 @@ void hmp_info_status(Monitor *mon); ...@@ -24,5 +24,6 @@ void hmp_info_status(Monitor *mon);
void hmp_info_uuid(Monitor *mon); void hmp_info_uuid(Monitor *mon);
void hmp_info_chardev(Monitor *mon); void hmp_info_chardev(Monitor *mon);
void hmp_quit(Monitor *mon, const QDict *qdict); void hmp_quit(Monitor *mon, const QDict *qdict);
void hmp_stop(Monitor *mon, const QDict *qdict);
#endif #endif
...@@ -1212,15 +1212,6 @@ static void do_singlestep(Monitor *mon, const QDict *qdict) ...@@ -1212,15 +1212,6 @@ static void do_singlestep(Monitor *mon, const QDict *qdict)
} }
} }
/**
* 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); static void encrypted_bdrv_it(void *opaque, BlockDriverState *bs);
struct bdrv_iterate_context { struct bdrv_iterate_context {
......
...@@ -236,3 +236,15 @@ ...@@ -236,3 +236,15 @@
# Since: 0.14.0 # Since: 0.14.0
## ##
{ 'command': 'quit' } { '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' }
...@@ -178,10 +178,7 @@ EQMP ...@@ -178,10 +178,7 @@ EQMP
{ {
.name = "stop", .name = "stop",
.args_type = "", .args_type = "",
.params = "", .mhandler.cmd_new = qmp_marshal_input_stop,
.help = "stop emulation",
.user_print = monitor_user_noop,
.mhandler.cmd_new = do_stop,
}, },
SQMP SQMP
......
...@@ -76,3 +76,8 @@ void qmp_quit(Error **err) ...@@ -76,3 +76,8 @@ void qmp_quit(Error **err)
qemu_system_shutdown_request(); qemu_system_shutdown_request();
} }
void qmp_stop(Error **errp)
{
vm_stop(RUN_STATE_PAUSED);
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册