system/physmem: Fix reference to dump-guest-core
[qemu/ar7.git] / qapi / misc-target.json
blob2d7d4d89bd5d28bf200147a2212643ac67fba073
1 # -*- Mode: Python -*-
2 # vim: filetype=python
5 ##
6 # @rtc-reset-reinjection:
8 # This command will reset the RTC interrupt reinjection backlog.  Can
9 # be used if another mechanism to synchronize guest time is in effect,
10 # for example QEMU guest agent's guest-set-time command.
12 # Since: 2.1
14 # Example:
16 #     -> { "execute": "rtc-reset-reinjection" }
17 #     <- { "return": {} }
19 { 'command': 'rtc-reset-reinjection',
20   'if': 'TARGET_I386' }
23 # @SevState:
25 # An enumeration of SEV state information used during @query-sev.
27 # @uninit: The guest is uninitialized.
29 # @launch-update: The guest is currently being launched; plaintext
30 #     data and register state is being imported.
32 # @launch-secret: The guest is currently being launched; ciphertext
33 #     data is being imported.
35 # @running: The guest is fully launched or migrated in.
37 # @send-update: The guest is currently being migrated out to another
38 #     machine.
40 # @receive-update: The guest is currently being migrated from another
41 #     machine.
43 # Since: 2.12
45 { 'enum': 'SevState',
46   'data': ['uninit', 'launch-update', 'launch-secret', 'running',
47            'send-update', 'receive-update' ],
48   'if': 'TARGET_I386' }
51 # @SevGuestType:
53 # An enumeration indicating the type of SEV guest being run.
55 # @sev: The guest is a legacy SEV or SEV-ES guest.
57 # @sev-snp: The guest is an SEV-SNP guest.
59 # Since: 6.2
61 { 'enum': 'SevGuestType',
62   'data': [ 'sev', 'sev-snp' ],
63   'if': 'TARGET_I386' }
66 # @SevGuestInfo:
68 # Information specific to legacy SEV/SEV-ES guests.
70 # @policy: SEV policy value
72 # @handle: SEV firmware handle
74 # Since: 2.12
76 { 'struct': 'SevGuestInfo',
77   'data': { 'policy': 'uint32',
78             'handle': 'uint32' },
79   'if': 'TARGET_I386' }
82 # @SevSnpGuestInfo:
84 # Information specific to SEV-SNP guests.
86 # @snp-policy: SEV-SNP policy value
88 # Since: 9.1
90 { 'struct': 'SevSnpGuestInfo',
91   'data': { 'snp-policy': 'uint64' },
92   'if': 'TARGET_I386' }
95 # @SevInfo:
97 # Information about Secure Encrypted Virtualization (SEV) support
99 # @enabled: true if SEV is active
101 # @api-major: SEV API major version
103 # @api-minor: SEV API minor version
105 # @build-id: SEV FW build id
107 # @state: SEV guest state
109 # @sev-type: Type of SEV guest being run
111 # Since: 2.12
113 { 'union': 'SevInfo',
114   'base': { 'enabled': 'bool',
115             'api-major': 'uint8',
116             'api-minor' : 'uint8',
117             'build-id' : 'uint8',
118             'state' : 'SevState',
119             'sev-type' : 'SevGuestType' },
120   'discriminator': 'sev-type',
121   'data': {
122       'sev': 'SevGuestInfo',
123       'sev-snp': 'SevSnpGuestInfo' },
124   'if': 'TARGET_I386' }
128 # @query-sev:
130 # Returns information about SEV
132 # Returns: @SevInfo
134 # Since: 2.12
136 # Example:
138 #     -> { "execute": "query-sev" }
139 #     <- { "return": { "enabled": true, "api-major" : 0, "api-minor" : 0,
140 #                      "build-id" : 0, "policy" : 0, "state" : "running",
141 #                      "handle" : 1 } }
143 { 'command': 'query-sev', 'returns': 'SevInfo',
144   'if': 'TARGET_I386' }
147 # @SevLaunchMeasureInfo:
149 # SEV Guest Launch measurement information
151 # @data: the measurement value encoded in base64
153 # Since: 2.12
155 { 'struct': 'SevLaunchMeasureInfo', 'data': {'data': 'str'},
156   'if': 'TARGET_I386' }
159 # @query-sev-launch-measure:
161 # Query the SEV guest launch information.
163 # Returns: The @SevLaunchMeasureInfo for the guest
165 # Since: 2.12
167 # Example:
169 #     -> { "execute": "query-sev-launch-measure" }
170 #     <- { "return": { "data": "4l8LXeNlSPUDlXPJG5966/8%YZ" } }
172 { 'command': 'query-sev-launch-measure', 'returns': 'SevLaunchMeasureInfo',
173   'if': 'TARGET_I386' }
176 # @SevCapability:
178 # The struct describes capability for a Secure Encrypted
179 # Virtualization feature.
181 # @pdh: Platform Diffie-Hellman key (base64 encoded)
183 # @cert-chain: PDH certificate chain (base64 encoded)
185 # @cpu0-id: Unique ID of CPU0 (base64 encoded) (since 7.1)
187 # @cbitpos: C-bit location in page table entry
189 # @reduced-phys-bits: Number of physical Address bit reduction when
190 #     SEV is enabled
192 # Since: 2.12
194 { 'struct': 'SevCapability',
195   'data': { 'pdh': 'str',
196             'cert-chain': 'str',
197             'cpu0-id': 'str',
198             'cbitpos': 'int',
199             'reduced-phys-bits': 'int'},
200   'if': 'TARGET_I386' }
203 # @query-sev-capabilities:
205 # This command is used to get the SEV capabilities, and is supported
206 # on AMD X86 platforms only.
208 # Returns: SevCapability objects.
210 # Since: 2.12
212 # Example:
214 #     -> { "execute": "query-sev-capabilities" }
215 #     <- { "return": { "pdh": "8CCDD8DDD", "cert-chain": "888CCCDDDEE",
216 #                      "cpu0-id": "2lvmGwo+...61iEinw==",
217 #                      "cbitpos": 47, "reduced-phys-bits": 1}}
219 { 'command': 'query-sev-capabilities', 'returns': 'SevCapability',
220   'if': 'TARGET_I386' }
223 # @sev-inject-launch-secret:
225 # This command injects a secret blob into memory of SEV guest.
227 # @packet-header: the launch secret packet header encoded in base64
229 # @secret: the launch secret data to be injected encoded in base64
231 # @gpa: the guest physical address where secret will be injected.
233 # Since: 6.0
235 { 'command': 'sev-inject-launch-secret',
236   'data': { 'packet-header': 'str', 'secret': 'str', '*gpa': 'uint64' },
237   'if': 'TARGET_I386' }
240 # @SevAttestationReport:
242 # The struct describes attestation report for a Secure Encrypted
243 # Virtualization feature.
245 # @data: guest attestation report (base64 encoded)
247 # Since: 6.1
249 { 'struct': 'SevAttestationReport',
250   'data': { 'data': 'str'},
251   'if': 'TARGET_I386' }
254 # @query-sev-attestation-report:
256 # This command is used to get the SEV attestation report, and is
257 # supported on AMD X86 platforms only.
259 # @mnonce: a random 16 bytes value encoded in base64 (it will be
260 #     included in report)
262 # Returns: SevAttestationReport objects.
264 # Since: 6.1
266 # Example:
268 #     -> { "execute" : "query-sev-attestation-report",
269 #                      "arguments": { "mnonce": "aaaaaaa" } }
270 #     <- { "return" : { "data": "aaaaaaaabbbddddd"} }
272 { 'command': 'query-sev-attestation-report',
273   'data': { 'mnonce': 'str' },
274   'returns': 'SevAttestationReport',
275   'if': 'TARGET_I386' }
278 # @dump-skeys:
280 # Dump guest's storage keys
282 # @filename: the path to the file to dump to
284 # Since: 2.5
286 # Example:
288 #     -> { "execute": "dump-skeys",
289 #          "arguments": { "filename": "/tmp/skeys" } }
290 #     <- { "return": {} }
292 { 'command': 'dump-skeys',
293   'data': { 'filename': 'str' },
294   'if': 'TARGET_S390X' }
297 # @GICCapability:
299 # The struct describes capability for a specific GIC (Generic
300 # Interrupt Controller) version.  These bits are not only decided by
301 # QEMU/KVM software version, but also decided by the hardware that the
302 # program is running upon.
304 # @version: version of GIC to be described.  Currently, only 2 and 3
305 #     are supported.
307 # @emulated: whether current QEMU/hardware supports emulated GIC
308 #     device in user space.
310 # @kernel: whether current QEMU/hardware supports hardware accelerated
311 #     GIC device in kernel.
313 # Since: 2.6
315 { 'struct': 'GICCapability',
316   'data': { 'version': 'int',
317             'emulated': 'bool',
318             'kernel': 'bool' },
319   'if': 'TARGET_ARM' }
322 # @query-gic-capabilities:
324 # This command is ARM-only.  It will return a list of GICCapability
325 # objects that describe its capability bits.
327 # Returns: a list of GICCapability objects.
329 # Since: 2.6
331 # Example:
333 #     -> { "execute": "query-gic-capabilities" }
334 #     <- { "return": [{ "version": 2, "emulated": true, "kernel": false },
335 #                     { "version": 3, "emulated": false, "kernel": true } ] }
337 { 'command': 'query-gic-capabilities', 'returns': ['GICCapability'],
338   'if': 'TARGET_ARM' }
341 # @SGXEPCSection:
343 # Information about intel SGX EPC section info
345 # @node: the numa node
347 # @size: the size of EPC section
349 # Since: 7.0
351 { 'struct': 'SGXEPCSection',
352   'data': { 'node': 'int',
353             'size': 'uint64'}}
356 # @SGXInfo:
358 # Information about intel Safe Guard eXtension (SGX) support
360 # @sgx: true if SGX is supported
362 # @sgx1: true if SGX1 is supported
364 # @sgx2: true if SGX2 is supported
366 # @flc: true if FLC is supported
368 # @sections: The EPC sections info for guest (Since: 7.0)
370 # Since: 6.2
372 { 'struct': 'SGXInfo',
373   'data': { 'sgx': 'bool',
374             'sgx1': 'bool',
375             'sgx2': 'bool',
376             'flc': 'bool',
377             'sections': ['SGXEPCSection']},
378    'if': 'TARGET_I386' }
381 # @query-sgx:
383 # Returns information about SGX
385 # Returns: @SGXInfo
387 # Since: 6.2
389 # Example:
391 #     -> { "execute": "query-sgx" }
392 #     <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : true,
393 #                      "flc": true,
394 #                      "sections": [{"node": 0, "size": 67108864},
395 #                      {"node": 1, "size": 29360128}]} }
397 { 'command': 'query-sgx', 'returns': 'SGXInfo', 'if': 'TARGET_I386' }
400 # @query-sgx-capabilities:
402 # Returns information from host SGX capabilities
404 # Returns: @SGXInfo
406 # Since: 6.2
408 # Example:
410 #     -> { "execute": "query-sgx-capabilities" }
411 #     <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : true,
412 #                      "flc": true,
413 #                      "section" : [{"node": 0, "size": 67108864},
414 #                      {"node": 1, "size": 29360128}]} }
416 { 'command': 'query-sgx-capabilities', 'returns': 'SGXInfo', 'if': 'TARGET_I386' }
420 # @EvtchnPortType:
422 # An enumeration of Xen event channel port types.
424 # @closed: The port is unused.
426 # @unbound: The port is allocated and ready to be bound.
428 # @interdomain: The port is connected as an interdomain interrupt.
430 # @pirq: The port is bound to a physical IRQ (PIRQ).
432 # @virq: The port is bound to a virtual IRQ (VIRQ).
434 # @ipi: The post is an inter-processor interrupt (IPI).
436 # Since: 8.0
438 { 'enum': 'EvtchnPortType',
439   'data': ['closed', 'unbound', 'interdomain', 'pirq', 'virq', 'ipi'],
440   'if': 'TARGET_I386' }
443 # @EvtchnInfo:
445 # Information about a Xen event channel port
447 # @port: the port number
449 # @vcpu: target vCPU for this port
451 # @type: the port type
453 # @remote-domain: remote domain for interdomain ports
455 # @target: remote port ID, or virq/pirq number
457 # @pending: port is currently active pending delivery
459 # @masked: port is masked
461 # Since: 8.0
463 { 'struct': 'EvtchnInfo',
464   'data': {'port': 'uint16',
465            'vcpu': 'uint32',
466            'type': 'EvtchnPortType',
467            'remote-domain': 'str',
468            'target': 'uint16',
469            'pending': 'bool',
470            'masked': 'bool'},
471   'if': 'TARGET_I386' }
475 # @xen-event-list:
477 # Query the Xen event channels opened by the guest.
479 # Returns: list of open event channel ports.
481 # Since: 8.0
483 # Example:
485 #     -> { "execute": "xen-event-list" }
486 #     <- { "return": [
487 #             {
488 #                 "pending": false,
489 #                 "port": 1,
490 #                 "vcpu": 1,
491 #                 "remote-domain": "qemu",
492 #                 "masked": false,
493 #                 "type": "interdomain",
494 #                 "target": 1
495 #             },
496 #             {
497 #                 "pending": false,
498 #                 "port": 2,
499 #                 "vcpu": 0,
500 #                 "remote-domain": "",
501 #                 "masked": false,
502 #                 "type": "virq",
503 #                 "target": 0
504 #             }
505 #          ]
506 #        }
508 { 'command': 'xen-event-list',
509   'returns': ['EvtchnInfo'],
510   'if': 'TARGET_I386' }
513 # @xen-event-inject:
515 # Inject a Xen event channel port (interrupt) to the guest.
517 # @port: The port number
519 # Since: 8.0
521 # Example:
523 #     -> { "execute": "xen-event-inject", "arguments": { "port": 1 } }
524 #     <- { "return": { } }
526 { 'command': 'xen-event-inject',
527   'data': { 'port': 'uint32' },
528   'if': 'TARGET_I386' }