提交 abf23329 编写于 作者: J Jason J. Herne 提交者: Luiz Capitulino

qemu-monitor: HMP cpu-add wrapper

Add HMP cpu-add wrapper to allow cpu hot plugging via monitor.
Signed-off-by: NJason J. Herne <jjherne@us.ibm.com>
Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
上级 eca01d3a
......@@ -1617,6 +1617,19 @@ STEXI
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
@item cpu-add @var{id}
Add CPU with id @var{id}
ETEXI
{
......
......@@ -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");
......
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册