From b53ccc30c40df52d192e469a86c188a8649c6df3 Mon Sep 17 00:00:00 2001 From: qiaonuohan Date: Tue, 18 Feb 2014 14:11:36 +0800 Subject: dump: make kdump-compressed format available for 'dump-guest-memory' Make monitor command 'dump-guest-memory' be able to dump in kdump-compressed format. The command's usage: dump [-p] protocol [begin] [length] [format] 'format' is used to specified the format of vmcore and can be: 1. 'elf': ELF format, without compression 2. 'kdump-zlib': kdump-compressed format, with zlib-compressed 3. 'kdump-lzo': kdump-compressed format, with lzo-compressed 4. 'kdump-snappy': kdump-compressed format, with snappy-compressed Without 'format' being set, it is same as 'elf'. And if non-elf format is specified, paging and filter is not allowed. Note: 1. The kdump-compressed format is readable only with the crash utility and makedumpfile, and it can be smaller than the ELF format because of the compression support. 2. The kdump-compressed format is the 6th edition. Signed-off-by: Qiao Nuohan Reviewed-by: Laszlo Ersek Signed-off-by: Luiz Capitulino --- qapi-schema.json | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'qapi-schema.json') diff --git a/qapi-schema.json b/qapi-schema.json index ac8ad24966..0d04ace4aa 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2794,6 +2794,24 @@ ## { 'command': 'device_del', 'data': {'id': 'str'} } +## +# @DumpGuestMemoryFormat: +# +# An enumeration of guest-memory-dump's format. +# +# @elf: elf format +# +# @kdump-zlib: kdump-compressed format with zlib-compressed +# +# @kdump-lzo: kdump-compressed format with lzo-compressed +# +# @kdump-snappy: kdump-compressed format with snappy-compressed +# +# Since: 2.0 +## +{ 'enum': 'DumpGuestMemoryFormat', + 'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] } + ## # @dump-guest-memory # @@ -2830,13 +2848,18 @@ # want to dump all guest's memory, please specify the start @begin # and @length # +# @format: #optional if specified, the format of guest memory dump. But non-elf +# format is conflict with paging and filter, ie. @paging, @begin and +# @length is not allowed to be specified with non-elf @format at the +# same time (since 2.0) +# # Returns: nothing on success # # Since: 1.2 ## { 'command': 'dump-guest-memory', 'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int', - '*length': 'int' } } + '*length': 'int', '*format': 'DumpGuestMemoryFormat' } } ## # @netdev_add: -- cgit v1.2.1 From 7d6dc7f30c4781857ce230333da6ddd21fe0dcde Mon Sep 17 00:00:00 2001 From: qiaonuohan Date: Tue, 18 Feb 2014 14:11:38 +0800 Subject: dump: add 'query-dump-guest-memory-capability' command 'query-dump-guest-memory-capability' is used to query the available formats for 'dump-guest-memory'. The output of the command will be like: -> { "execute": "query-dump-guest-memory-capability" } <- { "return": { "formats": ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] } Signed-off-by: Qiao Nuohan Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- qapi-schema.json | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'qapi-schema.json') diff --git a/qapi-schema.json b/qapi-schema.json index 0d04ace4aa..1a5f93e100 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2861,6 +2861,30 @@ 'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int', '*length': 'int', '*format': 'DumpGuestMemoryFormat' } } +## +# @DumpGuestMemoryCapability: +# +# A list of the available formats for dump-guest-memory +# +# Since: 2.0 +## +{ 'type': 'DumpGuestMemoryCapability', + 'data': { + 'formats': ['DumpGuestMemoryFormat'] } } + +## +# @query-dump-guest-memory-capability: +# +# Returns the available formats for dump-guest-memory +# +# Returns: A @DumpGuestMemoryCapability object listing available formats for +# dump-guest-memory +# +# Since: 2.0 +## +{ 'command': 'query-dump-guest-memory-capability', + 'returns': 'DumpGuestMemoryCapability' } + ## # @netdev_add: # -- cgit v1.2.1