[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 02/14] qemu-monitor: HMP cpu-add wrapper
From: |
Luiz Capitulino |
Subject: |
[Qemu-devel] [PULL 02/14] qemu-monitor: HMP cpu-add wrapper |
Date: |
Mon, 6 Jan 2014 17:03:03 -0500 |
From: "Jason J. Herne" <address@hidden>
Add HMP cpu-add wrapper to allow cpu hot plugging via monitor.
Signed-off-by: Jason J. Herne <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>
---
hmp-commands.hx | 13 +++++++++++++
hmp.c | 10 ++++++++++
hmp.h | 1 +
3 files changed, 24 insertions(+)
diff --git a/hmp-commands.hx b/hmp-commands.hx
index ebe8e78..929550d 100644
--- a/hmp-commands.hx
+++ b/hmp-commands.hx
@@ -1620,6 +1620,19 @@ Executes a qemu-io command on the given block device.
ETEXI
{
+ .name = "cpu-add",
+ .args_type = "id:i",
+ .params = "id",
+ .help = "add cpu",
+ .mhandler.cmd = hmp_cpu_add,
+ },
+
+STEXI
address@hidden cpu-add @var{id}
+Add CPU with id @var{id}
+ETEXI
+
+ {
.name = "info",
.args_type = "item:s?",
.params = "[subcommand]",
diff --git a/hmp.c b/hmp.c
index 32ee285..c513f9b 100644
--- a/hmp.c
+++ b/hmp.c
@@ -1525,6 +1525,16 @@ void hmp_nbd_server_stop(Monitor *mon, const QDict
*qdict)
hmp_handle_error(mon, &errp);
}
+void hmp_cpu_add(Monitor *mon, const QDict *qdict)
+{
+ int cpuid;
+ Error *err = NULL;
+
+ cpuid = qdict_get_int(qdict, "id");
+ qmp_cpu_add(cpuid, &err);
+ hmp_handle_error(mon, &err);
+}
+
void hmp_chardev_add(Monitor *mon, const QDict *qdict)
{
const char *args = qdict_get_str(qdict, "args");
diff --git a/hmp.h b/hmp.h
index 54cf71f..f92fc89 100644
--- a/hmp.h
+++ b/hmp.h
@@ -89,5 +89,6 @@ void hmp_nbd_server_stop(Monitor *mon, const QDict *qdict);
void hmp_chardev_add(Monitor *mon, const QDict *qdict);
void hmp_chardev_remove(Monitor *mon, const QDict *qdict);
void hmp_qemu_io(Monitor *mon, const QDict *qdict);
+void hmp_cpu_add(Monitor *mon, const QDict *qdict);
#endif
--
1.8.1.4
- [Qemu-devel] [PULL 00/14] QMP queue, Luiz Capitulino, 2014/01/06
- [Qemu-devel] [PULL 01/14] vl: add missing transition debug->finish_migrate, Luiz Capitulino, 2014/01/06
- [Qemu-devel] [PULL 02/14] qemu-monitor: HMP cpu-add wrapper,
Luiz Capitulino <=
- [Qemu-devel] [PULL 03/14] rng: initialize file descriptor to -1, Luiz Capitulino, 2014/01/06
- [Qemu-devel] [PULL 08/14] error: Add error_abort, Luiz Capitulino, 2014/01/06
- [Qemu-devel] [PULL 05/14] qom: catch errors in object_property_add_child, Luiz Capitulino, 2014/01/06
- [Qemu-devel] [PULL 09/14] qdev: Delete dead code, Luiz Capitulino, 2014/01/06
- [Qemu-devel] [PULL 06/14] monitor: add object-del (QMP) and object_del (HMP) command, Luiz Capitulino, 2014/01/06
- [Qemu-devel] [PULL 04/14] qom: fix leak for objects created with -object, Luiz Capitulino, 2014/01/06
- [Qemu-devel] [PULL 12/14] qemu-option: Remove qemu_opts_create_nofail, Luiz Capitulino, 2014/01/06
- [Qemu-devel] [PULL 10/14] hw: Remove assert_no_error usages, Luiz Capitulino, 2014/01/06
- [Qemu-devel] [PULL 11/14] target-i386: Remove assert_no_error usage, Luiz Capitulino, 2014/01/06
- [Qemu-devel] [PULL 07/14] monitor: add object-add (QMP) and object_add (HMP) command, Luiz Capitulino, 2014/01/06