block: use int64_t instead of uint64_t in copy_range driver handlers
[qemu/ericb.git] / qapi / misc-target.json
blob3b05ad3dbfbf1485d515844f7dd7ab53e8b92906
1 # -*- Mode: Python -*-
2 # vim: filetype=python
5 ##
6 # @RTC_CHANGE:
8 # Emitted when the guest changes the RTC time.
10 # @offset: offset between base RTC clock (as specified by -rtc base), and
11 #          new RTC clock value
13 # Note: This event is rate-limited.
15 # Since: 0.13
17 # Example:
19 # <-   { "event": "RTC_CHANGE",
20 #        "data": { "offset": 78 },
21 #        "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
24 { 'event': 'RTC_CHANGE',
25   'data': { 'offset': 'int' },
26   'if': { 'any': [ 'TARGET_ALPHA',
27                    'TARGET_ARM',
28                    'TARGET_HPPA',
29                    'TARGET_I386',
30                    'TARGET_MIPS',
31                    'TARGET_MIPS64',
32                    'TARGET_PPC',
33                    'TARGET_PPC64',
34                    'TARGET_S390X',
35                    'TARGET_SH4',
36                    'TARGET_SPARC' ] } }
39 # @rtc-reset-reinjection:
41 # This command will reset the RTC interrupt reinjection backlog.
42 # Can be used if another mechanism to synchronize guest time
43 # is in effect, for example QEMU guest agent's guest-set-time
44 # command.
46 # Since: 2.1
48 # Example:
50 # -> { "execute": "rtc-reset-reinjection" }
51 # <- { "return": {} }
54 { 'command': 'rtc-reset-reinjection',
55   'if': 'TARGET_I386' }
59 # @SevState:
61 # An enumeration of SEV state information used during @query-sev.
63 # @uninit: The guest is uninitialized.
65 # @launch-update: The guest is currently being launched; plaintext data and
66 #                 register state is being imported.
68 # @launch-secret: The guest is currently being launched; ciphertext data
69 #                 is being imported.
71 # @running: The guest is fully launched or migrated in.
73 # @send-update: The guest is currently being migrated out to another machine.
75 # @receive-update: The guest is currently being migrated from another machine.
77 # Since: 2.12
79 { 'enum': 'SevState',
80   'data': ['uninit', 'launch-update', 'launch-secret', 'running',
81            'send-update', 'receive-update' ],
82   'if': 'TARGET_I386' }
85 # @SevInfo:
87 # Information about Secure Encrypted Virtualization (SEV) support
89 # @enabled: true if SEV is active
91 # @api-major: SEV API major version
93 # @api-minor: SEV API minor version
95 # @build-id: SEV FW build id
97 # @policy: SEV policy value
99 # @state: SEV guest state
101 # @handle: SEV firmware handle
103 # Since: 2.12
105 { 'struct': 'SevInfo',
106     'data': { 'enabled': 'bool',
107               'api-major': 'uint8',
108               'api-minor' : 'uint8',
109               'build-id' : 'uint8',
110               'policy' : 'uint32',
111               'state' : 'SevState',
112               'handle' : 'uint32'
113             },
114   'if': 'TARGET_I386'
118 # @query-sev:
120 # Returns information about SEV
122 # Returns: @SevInfo
124 # Since: 2.12
126 # Example:
128 # -> { "execute": "query-sev" }
129 # <- { "return": { "enabled": true, "api-major" : 0, "api-minor" : 0,
130 #                  "build-id" : 0, "policy" : 0, "state" : "running",
131 #                  "handle" : 1 } }
134 { 'command': 'query-sev', 'returns': 'SevInfo',
135   'if': 'TARGET_I386' }
139 # @SevLaunchMeasureInfo:
141 # SEV Guest Launch measurement information
143 # @data: the measurement value encoded in base64
145 # Since: 2.12
148 { 'struct': 'SevLaunchMeasureInfo', 'data': {'data': 'str'},
149   'if': 'TARGET_I386' }
152 # @query-sev-launch-measure:
154 # Query the SEV guest launch information.
156 # Returns: The @SevLaunchMeasureInfo for the guest
158 # Since: 2.12
160 # Example:
162 # -> { "execute": "query-sev-launch-measure" }
163 # <- { "return": { "data": "4l8LXeNlSPUDlXPJG5966/8%YZ" } }
166 { 'command': 'query-sev-launch-measure', 'returns': 'SevLaunchMeasureInfo',
167   'if': 'TARGET_I386' }
171 # @SevCapability:
173 # The struct describes capability for a Secure Encrypted Virtualization
174 # feature.
176 # @pdh:  Platform Diffie-Hellman key (base64 encoded)
178 # @cert-chain:  PDH certificate chain (base64 encoded)
180 # @cbitpos: C-bit location in page table entry
182 # @reduced-phys-bits: Number of physical Address bit reduction when SEV is
183 #                     enabled
185 # Since: 2.12
187 { 'struct': 'SevCapability',
188   'data': { 'pdh': 'str',
189             'cert-chain': 'str',
190             'cbitpos': 'int',
191             'reduced-phys-bits': 'int'},
192   'if': 'TARGET_I386' }
195 # @query-sev-capabilities:
197 # This command is used to get the SEV capabilities, and is supported on AMD
198 # X86 platforms only.
200 # Returns: SevCapability objects.
202 # Since: 2.12
204 # Example:
206 # -> { "execute": "query-sev-capabilities" }
207 # <- { "return": { "pdh": "8CCDD8DDD", "cert-chain": "888CCCDDDEE",
208 #                  "cbitpos": 47, "reduced-phys-bits": 5}}
211 { 'command': 'query-sev-capabilities', 'returns': 'SevCapability',
212   'if': 'TARGET_I386' }
215 # @sev-inject-launch-secret:
217 # This command injects a secret blob into memory of SEV guest.
219 # @packet-header: the launch secret packet header encoded in base64
221 # @secret: the launch secret data to be injected encoded in base64
223 # @gpa: the guest physical address where secret will be injected.
225 # Since: 6.0
228 { 'command': 'sev-inject-launch-secret',
229   'data': { 'packet-header': 'str', 'secret': 'str', '*gpa': 'uint64' },
230   'if': 'TARGET_I386' }
233 # @dump-skeys:
235 # Dump guest's storage keys
237 # @filename: the path to the file to dump to
239 # This command is only supported on s390 architecture.
241 # Since: 2.5
243 # Example:
245 # -> { "execute": "dump-skeys",
246 #      "arguments": { "filename": "/tmp/skeys" } }
247 # <- { "return": {} }
250 { 'command': 'dump-skeys',
251   'data': { 'filename': 'str' },
252   'if': 'TARGET_S390X' }
255 # @GICCapability:
257 # The struct describes capability for a specific GIC (Generic
258 # Interrupt Controller) version. These bits are not only decided by
259 # QEMU/KVM software version, but also decided by the hardware that
260 # the program is running upon.
262 # @version: version of GIC to be described. Currently, only 2 and 3
263 #           are supported.
265 # @emulated: whether current QEMU/hardware supports emulated GIC
266 #            device in user space.
268 # @kernel: whether current QEMU/hardware supports hardware
269 #          accelerated GIC device in kernel.
271 # Since: 2.6
273 { 'struct': 'GICCapability',
274   'data': { 'version': 'int',
275             'emulated': 'bool',
276             'kernel': 'bool' },
277   'if': 'TARGET_ARM' }
280 # @query-gic-capabilities:
282 # This command is ARM-only. It will return a list of GICCapability
283 # objects that describe its capability bits.
285 # Returns: a list of GICCapability objects.
287 # Since: 2.6
289 # Example:
291 # -> { "execute": "query-gic-capabilities" }
292 # <- { "return": [{ "version": 2, "emulated": true, "kernel": false },
293 #                 { "version": 3, "emulated": false, "kernel": true } ] }
296 { 'command': 'query-gic-capabilities', 'returns': ['GICCapability'],
297   'if': 'TARGET_ARM' }
301 # @SevAttestationReport:
303 # The struct describes attestation report for a Secure Encrypted Virtualization
304 # feature.
306 # @data:  guest attestation report (base64 encoded)
309 # Since: 6.1
311 { 'struct': 'SevAttestationReport',
312   'data': { 'data': 'str'},
313   'if': 'TARGET_I386' }
316 # @query-sev-attestation-report:
318 # This command is used to get the SEV attestation report, and is supported on AMD
319 # X86 platforms only.
321 # @mnonce: a random 16 bytes value encoded in base64 (it will be included in report)
323 # Returns: SevAttestationReport objects.
325 # Since: 6.1
327 # Example:
329 # -> { "execute" : "query-sev-attestation-report", "arguments": { "mnonce": "aaaaaaa" } }
330 # <- { "return" : { "data": "aaaaaaaabbbddddd"} }
333 { 'command': 'query-sev-attestation-report', 'data': { 'mnonce': 'str' },
334   'returns': 'SevAttestationReport',
335   'if': 'TARGET_I386' }