target/mips: Simplify decode_opc_mxu() ifdef'ry
[qemu/ar7.git] / qapi / dump.json
blobf7c4267e3fcd4eeb34aa8957547b05c1462d60ab
1 # -*- Mode: Python -*-
2 # vim: filetype=python
4 # This work is licensed under the terms of the GNU GPL, version 2 or later.
5 # See the COPYING file in the top-level directory.
7 ##
8 # = Dump guest memory
9 ##
12 # @DumpGuestMemoryFormat:
14 # An enumeration of guest-memory-dump's format.
16 # @elf: elf format
18 # @kdump-zlib: kdump-compressed format with zlib-compressed
20 # @kdump-lzo: kdump-compressed format with lzo-compressed
22 # @kdump-snappy: kdump-compressed format with snappy-compressed
24 # @win-dmp: Windows full crashdump format,
25 #           can be used instead of ELF converting (since 2.13)
27 # Since: 2.0
29 { 'enum': 'DumpGuestMemoryFormat',
30   'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy', 'win-dmp' ] }
33 # @dump-guest-memory:
35 # Dump guest's memory to vmcore. It is a synchronous operation that can take
36 # very long depending on the amount of guest memory.
38 # @paging: if true, do paging to get guest's memory mapping. This allows
39 #          using gdb to process the core file.
41 #          IMPORTANT: this option can make QEMU allocate several gigabytes
42 #          of RAM. This can happen for a large guest, or a
43 #          malicious guest pretending to be large.
45 #          Also, paging=true has the following limitations:
47 #             1. The guest may be in a catastrophic state or can have corrupted
48 #                memory, which cannot be trusted
49 #             2. The guest can be in real-mode even if paging is enabled. For
50 #                example, the guest uses ACPI to sleep, and ACPI sleep state
51 #                goes in real-mode
52 #             3. Currently only supported on i386 and x86_64.
54 # @protocol: the filename or file descriptor of the vmcore. The supported
55 #            protocols are:
57 #            1. file: the protocol starts with "file:", and the following
58 #               string is the file's path.
59 #            2. fd: the protocol starts with "fd:", and the following string
60 #               is the fd's name.
62 # @detach: if true, QMP will return immediately rather than
63 #          waiting for the dump to finish. The user can track progress
64 #          using "query-dump". (since 2.6).
66 # @begin: if specified, the starting physical address.
68 # @length: if specified, the memory size, in bytes. If you don't
69 #          want to dump all guest's memory, please specify the start @begin
70 #          and @length
72 # @format: if specified, the format of guest memory dump. But non-elf
73 #          format is conflict with paging and filter, ie. @paging, @begin and
74 #          @length is not allowed to be specified with non-elf @format at the
75 #          same time (since 2.0)
77 # Note: All boolean arguments default to false
79 # Returns: nothing on success
81 # Since: 1.2
83 # Example:
85 # -> { "execute": "dump-guest-memory",
86 #      "arguments": { "protocol": "fd:dump" } }
87 # <- { "return": {} }
90 { 'command': 'dump-guest-memory',
91   'data': { 'paging': 'bool', 'protocol': 'str', '*detach': 'bool',
92             '*begin': 'int', '*length': 'int',
93             '*format': 'DumpGuestMemoryFormat'} }
96 # @DumpStatus:
98 # Describe the status of a long-running background guest memory dump.
100 # @none: no dump-guest-memory has started yet.
102 # @active: there is one dump running in background.
104 # @completed: the last dump has finished successfully.
106 # @failed: the last dump has failed.
108 # Since: 2.6
110 { 'enum': 'DumpStatus',
111   'data': [ 'none', 'active', 'completed', 'failed' ] }
114 # @DumpQueryResult:
116 # The result format for 'query-dump'.
118 # @status: enum of @DumpStatus, which shows current dump status
120 # @completed: bytes written in latest dump (uncompressed)
122 # @total: total bytes to be written in latest dump (uncompressed)
124 # Since: 2.6
126 { 'struct': 'DumpQueryResult',
127   'data': { 'status': 'DumpStatus',
128             'completed': 'int',
129             'total': 'int' } }
132 # @query-dump:
134 # Query latest dump status.
136 # Returns: A @DumpStatus object showing the dump status.
138 # Since: 2.6
140 # Example:
142 # -> { "execute": "query-dump" }
143 # <- { "return": { "status": "active", "completed": 1024000,
144 #                  "total": 2048000 } }
147 { 'command': 'query-dump', 'returns': 'DumpQueryResult' }
150 # @DUMP_COMPLETED:
152 # Emitted when background dump has completed
154 # @result: final dump status
156 # @error: human-readable error string that provides
157 #         hint on why dump failed. Only presents on failure. The
158 #         user should not try to interpret the error string.
160 # Since: 2.6
162 # Example:
164 # { "event": "DUMP_COMPLETED",
165 #   "data": {"result": {"total": 1090650112, "status": "completed",
166 #                       "completed": 1090650112} } }
169 { 'event': 'DUMP_COMPLETED' ,
170   'data': { 'result': 'DumpQueryResult', '*error': 'str' } }
173 # @DumpGuestMemoryCapability:
175 # A list of the available formats for dump-guest-memory
177 # Since: 2.0
179 { 'struct': 'DumpGuestMemoryCapability',
180   'data': {
181       'formats': ['DumpGuestMemoryFormat'] } }
184 # @query-dump-guest-memory-capability:
186 # Returns the available formats for dump-guest-memory
188 # Returns:  A @DumpGuestMemoryCapability object listing available formats for
189 #           dump-guest-memory
191 # Since: 2.0
193 # Example:
195 # -> { "execute": "query-dump-guest-memory-capability" }
196 # <- { "return": { "formats":
197 #                  ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] }
200 { 'command': 'query-dump-guest-memory-capability',
201   'returns': 'DumpGuestMemoryCapability' }