sm501: Drop unneded variable
[qemu/ar7.git] / qapi / dump.json
bloba1eed7b15c54eab8d95e6c7b4b722efee1523c93
1 # -*- Mode: Python -*-
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.
6 ##
7 # = Dump guest memory
8 ##
11 # @DumpGuestMemoryFormat:
13 # An enumeration of guest-memory-dump's format.
15 # @elf: elf 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)
26 # Since: 2.0
28 { 'enum': 'DumpGuestMemoryFormat',
29   'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy', 'win-dmp' ] }
32 # @dump-guest-memory:
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
50 #                goes in real-mode
51 #             3. Currently only supported on i386 and x86_64.
53 # @protocol: the filename or file descriptor of the vmcore. The supported
54 #            protocols are:
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
59 #               is the fd's name.
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
69 #          and @length
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
80 # Since: 1.2
82 # Example:
84 # -> { "execute": "dump-guest-memory",
85 #      "arguments": { "protocol": "fd:dump" } }
86 # <- { "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 } }
146 { 'command': 'query-dump', 'returns': 'DumpQueryResult' }
149 # @DUMP_COMPLETED:
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.
159 # Since: 2.6
161 # Example:
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
176 # Since: 2.0
178 { 'struct': 'DumpGuestMemoryCapability',
179   'data': {
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
188 #           dump-guest-memory
190 # Since: 2.0
192 # Example:
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' }