Enable HMP access to the cprload QMP command. Usage: cprload <file>
Signed-off-bu: Maran Wilson <maran.wil...@oracle.com> Signed-off-by: Steve Sistare <steven.sist...@oracle.com> --- hmp-commands.hx | 13 +++++++++++++ include/monitor/hmp.h | 1 + monitor/hmp-cmds.c | 8 ++++++++ 3 files changed, 22 insertions(+) diff --git a/hmp-commands.hx b/hmp-commands.hx index c8defd9..cb67150 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -372,6 +372,19 @@ SRST ERST { + .name = "cprload", + .args_type = "file:s", + .params = "file", + .help = "load VM checkpoint from file", + .cmd = hmp_cprload, + }, + +SRST +``cprload`` *tag* + Load a virtual machine from checkpoint file *file* and continue VCPUs. +ERST + + { .name = "delvm", .args_type = "name:s", .params = "tag", diff --git a/include/monitor/hmp.h b/include/monitor/hmp.h index af8ee23..7b8cdfd 100644 --- a/include/monitor/hmp.h +++ b/include/monitor/hmp.h @@ -60,6 +60,7 @@ void hmp_loadvm(Monitor *mon, const QDict *qdict); void hmp_savevm(Monitor *mon, const QDict *qdict); void hmp_delvm(Monitor *mon, const QDict *qdict); void hmp_cprsave(Monitor *mon, const QDict *qdict); +void hmp_cprload(Monitor *mon, const QDict *qdict); void hmp_migrate_cancel(Monitor *mon, const QDict *qdict); void hmp_migrate_continue(Monitor *mon, const QDict *qdict); void hmp_migrate_incoming(Monitor *mon, const QDict *qdict); diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c index 59196ed..ba95737 100644 --- a/monitor/hmp-cmds.c +++ b/monitor/hmp-cmds.c @@ -1149,6 +1149,14 @@ void hmp_cprsave(Monitor *mon, const QDict *qdict) hmp_handle_error(mon, err); } +void hmp_cprload(Monitor *mon, const QDict *qdict) +{ + Error *err = NULL; + + qmp_cprload(qdict_get_try_str(qdict, "file"), &err); + hmp_handle_error(mon, err); +} + void hmp_migrate_cancel(Monitor *mon, const QDict *qdict) { qmp_migrate_cancel(NULL); -- 1.8.3.1