[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 19/21] qapi: Convert stop
From: |
Luiz Capitulino |
Subject: |
[Qemu-devel] [PATCH 19/21] qapi: Convert stop |
Date: |
Wed, 28 Sep 2011 11:44:43 -0300 |
The original conversion was done by Anthony Liguori. This commit
is just a rebase.
Signed-off-by: Luiz Capitulino <address@hidden>
---
hmp-commands.hx | 3 +--
hmp.c | 5 +++++
hmp.h | 1 +
monitor.c | 9 ---------
qapi-schema.json | 12 ++++++++++++
qmp-commands.hx | 5 +----
qmp.c | 5 +++++
7 files changed, 25 insertions(+), 15 deletions(-)
diff --git a/hmp-commands.hx b/hmp-commands.hx
index 2163e6f..3ad1ce7 100644
--- a/hmp-commands.hx
+++ b/hmp-commands.hx
@@ -290,8 +290,7 @@ ETEXI
.args_type = "",
.params = "",
.help = "stop emulation",
- .user_print = monitor_user_noop,
- .mhandler.cmd_new = do_stop,
+ .mhandler.cmd = hmp_stop,
},
STEXI
diff --git a/hmp.c b/hmp.c
index 1f7000a..871f858 100644
--- a/hmp.c
+++ b/hmp.c
@@ -99,3 +99,8 @@ void hmp_quit(Monitor *mon, const QDict *qdict)
monitor_suspend(mon);
qmp_quit(NULL);
}
+
+void hmp_stop(Monitor *mon, const QDict *qdict)
+{
+ qmp_stop(NULL);
+}
diff --git a/hmp.h b/hmp.h
index a3dfafd..cb21cce 100644
--- a/hmp.h
+++ b/hmp.h
@@ -24,5 +24,6 @@ void hmp_info_status(Monitor *mon);
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
diff --git a/monitor.c b/monitor.c
index 42c754a..b4a58b1 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1211,15 +1211,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(RSTATE_PAUSED);
- return 0;
-}
-
static void encrypted_bdrv_it(void *opaque, BlockDriverState *bs);
struct bdrv_iterate_context {
diff --git a/qapi-schema.json b/qapi-schema.json
index d6a60d2..830a508 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -236,3 +236,15 @@
# 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' }
diff --git a/qmp-commands.hx b/qmp-commands.hx
index 151a5fa..2ccddee 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -178,10 +178,7 @@ EQMP
{
.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
diff --git a/qmp.c b/qmp.c
index 1d380b6..e17c8b2 100644
--- a/qmp.c
+++ b/qmp.c
@@ -76,3 +76,8 @@ void qmp_quit(Error **err)
qemu_system_shutdown_request();
}
+void qmp_stop(Error **errp)
+{
+ vm_stop(RSTATE_PAUSED);
+}
+
--
1.7.7.rc0.72.g4b5ea
- [Qemu-devel] [PATCH 06/21] qapi: dealloc visitor, fix premature free and iteration logic, (continued)
- [Qemu-devel] [PATCH 06/21] qapi: dealloc visitor, fix premature free and iteration logic, Luiz Capitulino, 2011/09/28
- [Qemu-devel] [PATCH 17/21] qapi: Convert query-commands, Luiz Capitulino, 2011/09/28
- [Qemu-devel] [PATCH 21/21] qapi: Convert system_powerdown, Luiz Capitulino, 2011/09/28
- [Qemu-devel] [PATCH 13/21] qapi: Convert query-kvm, Luiz Capitulino, 2011/09/28
- [Qemu-devel] [PATCH 14/21] qapi: Convert query-status, Luiz Capitulino, 2011/09/28
- [Qemu-devel] [PATCH 18/21] qapi: Convert quit, Luiz Capitulino, 2011/09/28
- [Qemu-devel] [PATCH 15/21] qapi: Convert query-uuid, Luiz Capitulino, 2011/09/28
- [Qemu-devel] [PATCH 19/21] qapi: Convert stop,
Luiz Capitulino <=
- [Qemu-devel] [PATCH 10/21] qapi: modify visitor code generation for list iteration, Luiz Capitulino, 2011/09/28
- [Qemu-devel] [PATCH 20/21] qapi: Convert system_reset, Luiz Capitulino, 2011/09/28
- Re: [Qemu-devel] [PATCH v1 00/21]: First round of QAPI conversions, Anthony Liguori, 2011/09/29