@@ -1598,7 +1598,8 @@ cleanup:
void qmp_dump_guest_memory(bool paging, const char *file, bool has_begin,
int64_t begin, bool has_length,
int64_t length, bool has_format,
- DumpGuestMemoryFormat format, Error **errp)
+ DumpGuestMemoryFormat format, bool detach,
+ Error **errp)
{
const char *p;
int fd = -1;
@@ -1056,10 +1056,11 @@ ETEXI
{
.name = "dump-guest-memory",
- .args_type = "paging:-p,zlib:-z,lzo:-l,snappy:-s,filename:F,begin:i?,length:i?",
- .params = "[-p] [-z|-l|-s] filename [begin length]",
+ .args_type = "paging:-p,detach:-d,zlib:-z,lzo:-l,snappy:-s,filename:F,begin:i?,length:i?",
+ .params = "[-p] [-d] [-z|-l|-s] filename [begin length]",
.help = "dump guest memory into file 'filename'.\n\t\t\t"
"-p: do paging to get guest's memory mapping.\n\t\t\t"
+ "-d: return immediately (not wait for completion).\n\t\t\t"
"-z: dump in kdump-compressed format, with zlib compression.\n\t\t\t"
"-l: dump in kdump-compressed format, with lzo compression.\n\t\t\t"
"-s: dump in kdump-compressed format, with snappy compression.\n\t\t\t"
@@ -1580,6 +1580,7 @@ void hmp_dump_guest_memory(Monitor *mon, const QDict *qdict)
{
Error *err = NULL;
bool paging = qdict_get_try_bool(qdict, "paging", false);
+ bool detach = qdict_get_try_bool(qdict, "detach", false);
bool zlib = qdict_get_try_bool(qdict, "zlib", false);
bool lzo = qdict_get_try_bool(qdict, "lzo", false);
bool snappy = qdict_get_try_bool(qdict, "snappy", false);
@@ -1619,7 +1620,7 @@ void hmp_dump_guest_memory(Monitor *mon, const QDict *qdict)
prot = g_strconcat("file:", file, NULL);
qmp_dump_guest_memory(paging, prot, has_begin, begin, has_length, length,
- true, dump_format, &err);
+ true, dump_format, detach, &err);
hmp_handle_error(mon, &err);
g_free(prot);
}
@@ -2132,7 +2132,8 @@
##
{ 'command': 'dump-guest-memory',
'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
- '*length': 'int', '*format': 'DumpGuestMemoryFormat' } }
+ '*length': 'int', '*format': 'DumpGuestMemoryFormat',
+ 'detach': 'bool'} }
##
# @DumpGuestMemoryCapability:
@@ -840,8 +840,8 @@ EQMP
{
.name = "dump-guest-memory",
- .args_type = "paging:b,protocol:s,begin:i?,end:i?,format:s?",
- .params = "-p protocol [begin] [length] [format]",
+ .args_type = "paging:b,detach:d,protocol:s,begin:i?,end:i?,format:s?",
+ .params = "-p protocol [-d] [begin] [length] [format]",
.help = "dump guest memory to file",
.mhandler.cmd_new = qmp_marshal_dump_guest_memory,
},
This patch only add the interfaces, but not implementing them. Signed-off-by: Peter Xu <peterx@redhat.com> --- dump.c | 3 ++- hmp-commands.hx | 5 +++-- hmp.c | 3 ++- qapi-schema.json | 3 ++- qmp-commands.hx | 4 ++-- 5 files changed, 11 insertions(+), 7 deletions(-)