3 # This work is licensed under the terms of the GNU GPL, version 2 or later.
4 # See the COPYING file in the top-level directory.
11 # @DumpGuestMemoryFormat:
13 # An enumeration of guest-memory-dump's format.
17 # @kdump-zlib: kdump-compressed format with zlib-compressed
19 # @kdump-lzo: kdump-compressed format with lzo-compressed
21 # @kdump-snappy: kdump-compressed format with snappy-compressed
23 # @win-dmp: Windows full crashdump format,
24 # can be used instead of ELF converting (since 2.13)
28 { 'enum': 'DumpGuestMemoryFormat',
29 'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy', 'win-dmp' ] }
34 # Dump guest's memory to vmcore. It is a synchronous operation that can take
35 # very long depending on the amount of guest memory.
37 # @paging: if true, do paging to get guest's memory mapping. This allows
38 # using gdb to process the core file.
40 # IMPORTANT: this option can make QEMU allocate several gigabytes
41 # of RAM. This can happen for a large guest, or a
42 # malicious guest pretending to be large.
44 # Also, paging=true has the following limitations:
46 # 1. The guest may be in a catastrophic state or can have corrupted
47 # memory, which cannot be trusted
48 # 2. The guest can be in real-mode even if paging is enabled. For
49 # example, the guest uses ACPI to sleep, and ACPI sleep state
51 # 3. Currently only supported on i386 and x86_64.
53 # @protocol: the filename or file descriptor of the vmcore. The supported
56 # 1. file: the protocol starts with "file:", and the following
57 # string is the file's path.
58 # 2. fd: the protocol starts with "fd:", and the following string
61 # @detach: if true, QMP will return immediately rather than
62 # waiting for the dump to finish. The user can track progress
63 # using "query-dump". (since 2.6).
65 # @begin: if specified, the starting physical address.
67 # @length: if specified, the memory size, in bytes. If you don't
68 # want to dump all guest's memory, please specify the start @begin
71 # @format: if specified, the format of guest memory dump. But non-elf
72 # format is conflict with paging and filter, ie. @paging, @begin and
73 # @length is not allowed to be specified with non-elf @format at the
74 # same time (since 2.0)
76 # Note: All boolean arguments default to false
78 # Returns: nothing on success
84 # -> { "execute": "dump-guest-memory",
85 # "arguments": { "protocol": "fd:dump" } }
89 { 'command': 'dump-guest-memory',
90 'data': { 'paging': 'bool', 'protocol': 'str', '*detach': 'bool',
91 '*begin': 'int', '*length': 'int',
92 '*format': 'DumpGuestMemoryFormat'} }
97 # Describe the status of a long-running background guest memory dump.
99 # @none: no dump-guest-memory has started yet.
101 # @active: there is one dump running in background.
103 # @completed: the last dump has finished successfully.
105 # @failed: the last dump has failed.
109 { 'enum': 'DumpStatus',
110 'data': [ 'none', 'active', 'completed', 'failed' ] }
115 # The result format for 'query-dump'.
117 # @status: enum of @DumpStatus, which shows current dump status
119 # @completed: bytes written in latest dump (uncompressed)
121 # @total: total bytes to be written in latest dump (uncompressed)
125 { 'struct': 'DumpQueryResult',
126 'data': { 'status': 'DumpStatus',
133 # Query latest dump status.
135 # Returns: A @DumpStatus object showing the dump status.
141 # -> { "execute": "query-dump" }
142 # <- { "return": { "status": "active", "completed": 1024000,
143 # "total": 2048000 } }
146 { 'command': 'query-dump', 'returns': 'DumpQueryResult' }
151 # Emitted when background dump has completed
153 # @result: final dump status
155 # @error: human-readable error string that provides
156 # hint on why dump failed. Only presents on failure. The
157 # user should not try to interpret the error string.
163 # { "event": "DUMP_COMPLETED",
164 # "data": {"result": {"total": 1090650112, "status": "completed",
165 # "completed": 1090650112} } }
168 { 'event': 'DUMP_COMPLETED' ,
169 'data': { 'result': 'DumpQueryResult', '*error': 'str' } }
172 # @DumpGuestMemoryCapability:
174 # A list of the available formats for dump-guest-memory
178 { 'struct': 'DumpGuestMemoryCapability',
180 'formats': ['DumpGuestMemoryFormat'] } }
183 # @query-dump-guest-memory-capability:
185 # Returns the available formats for dump-guest-memory
187 # Returns: A @DumpGuestMemoryCapability object listing available formats for
194 # -> { "execute": "query-dump-guest-memory-capability" }
195 # <- { "return": { "formats":
196 # ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] }
199 { 'command': 'query-dump-guest-memory-capability',
200 'returns': 'DumpGuestMemoryCapability' }