hw/ppc: Clean up local variable shadowing in _FDT helper routine
[qemu/kevin.git] / qapi / dump.json
blob4ae1f722a9389ce636181e7358824ba4935fdbcd
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, can be used instead of ELF
25 #     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
36 # can take very long depending on the amount of guest memory.
38 # @paging: if true, do paging to get guest's memory mapping.  This
39 #     allows 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 malicious guest
43 #     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
48 #        corrupted 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
55 #     supported 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 waiting
63 #     for the dump to finish.  The user can track progress using
64 #     "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 want
69 #     to dump all guest's memory, please specify the start @begin and
70 #     @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
74 #     and @length is not allowed to be specified with non-elf @format
75 #     at the 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": { "paging": false, "protocol": "fd:dump" } }
87 # <- { "return": {} }
89 { 'command': 'dump-guest-memory',
90   'data': { 'paging': 'bool', 'protocol': 'str', '*detach': 'bool',
91             '*begin': 'int', '*length': 'int',
92             '*format': 'DumpGuestMemoryFormat'} }
95 # @DumpStatus:
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.
107 # Since: 2.6
109 { 'enum': 'DumpStatus',
110   'data': [ 'none', 'active', 'completed', 'failed' ] }
113 # @DumpQueryResult:
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)
123 # Since: 2.6
125 { 'struct': 'DumpQueryResult',
126   'data': { 'status': 'DumpStatus',
127             'completed': 'int',
128             'total': 'int' } }
131 # @query-dump:
133 # Query latest dump status.
135 # Returns: A @DumpStatus object showing the dump status.
137 # Since: 2.6
139 # Example:
141 # -> { "execute": "query-dump" }
142 # <- { "return": { "status": "active", "completed": 1024000,
143 #                  "total": 2048000 } }
145 { 'command': 'query-dump', 'returns': 'DumpQueryResult' }
148 # @DUMP_COMPLETED:
150 # Emitted when background dump has completed
152 # @result: final dump status
154 # @error: human-readable error string that provides hint on why dump
155 #     failed.  Only presents on failure.  The user should not try to
156 #     interpret the error string.
158 # Since: 2.6
160 # Example:
162 # <- { "event": "DUMP_COMPLETED",
163 #      "data": { "result": { "total": 1090650112, "status": "completed",
164 #                            "completed": 1090650112 } },
165 #      "timestamp": { "seconds": 1648244171, "microseconds": 950316 } }
167 { 'event': 'DUMP_COMPLETED' ,
168   'data': { 'result': 'DumpQueryResult', '*error': 'str' } }
171 # @DumpGuestMemoryCapability:
173 # A list of the available formats for dump-guest-memory
175 # Since: 2.0
177 { 'struct': 'DumpGuestMemoryCapability',
178   'data': {
179       'formats': ['DumpGuestMemoryFormat'] } }
182 # @query-dump-guest-memory-capability:
184 # Returns the available formats for dump-guest-memory
186 # Returns: A @DumpGuestMemoryCapability object listing available
187 #     formats for dump-guest-memory
189 # Since: 2.0
191 # Example:
193 # -> { "execute": "query-dump-guest-memory-capability" }
194 # <- { "return": { "formats":
195 #                  ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] } }
197 { 'command': 'query-dump-guest-memory-capability',
198   'returns': 'DumpGuestMemoryCapability' }