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.
16 # -> { "execute": "rtc-reset-reinjection" }
19 { 'command': 'rtc-reset-reinjection',
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
40 # @receive-update: The guest is currently being migrated from another
46 'data': ['uninit', 'launch-update', 'launch-secret', 'running',
47 'send-update', 'receive-update' ],
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.
61 { 'enum': 'SevGuestType',
62 'data': [ 'sev', 'sev-snp' ],
68 # Information specific to legacy SEV/SEV-ES guests.
70 # @policy: SEV policy value
72 # @handle: SEV firmware handle
76 { 'struct': 'SevGuestInfo',
77 'data': { 'policy': 'uint32',
84 # Information specific to SEV-SNP guests.
86 # @snp-policy: SEV-SNP policy value
90 { 'struct': 'SevSnpGuestInfo',
91 'data': { 'snp-policy': 'uint64' },
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
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',
122 'sev': 'SevGuestInfo',
123 'sev-snp': 'SevSnpGuestInfo' },
124 'if': 'TARGET_I386' }
130 # Returns information about SEV
138 # -> { "execute": "query-sev" }
139 # <- { "return": { "enabled": true, "api-major" : 0, "api-minor" : 0,
140 # "build-id" : 0, "policy" : 0, "state" : "running",
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
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
169 # -> { "execute": "query-sev-launch-measure" }
170 # <- { "return": { "data": "4l8LXeNlSPUDlXPJG5966/8%YZ" } }
172 { 'command': 'query-sev-launch-measure', 'returns': 'SevLaunchMeasureInfo',
173 'if': 'TARGET_I386' }
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
194 { 'struct': 'SevCapability',
195 'data': { 'pdh': 'str',
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.
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.
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)
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.
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' }
280 # Dump guest's storage keys
282 # @filename: the path to the file to dump to
288 # -> { "execute": "dump-skeys",
289 # "arguments": { "filename": "/tmp/skeys" } }
290 # <- { "return": {} }
292 { 'command': 'dump-skeys',
293 'data': { 'filename': 'str' },
294 'if': 'TARGET_S390X' }
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
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.
315 { 'struct': 'GICCapability',
316 'data': { 'version': 'int',
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.
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'],
343 # Information about intel SGX EPC section info
345 # @node: the numa node
347 # @size: the size of EPC section
351 { 'struct': 'SGXEPCSection',
352 'data': { 'node': 'int',
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)
372 { 'struct': 'SGXInfo',
373 'data': { 'sgx': 'bool',
377 'sections': ['SGXEPCSection']},
378 'if': 'TARGET_I386' }
383 # Returns information about SGX
391 # -> { "execute": "query-sgx" }
392 # <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : 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
410 # -> { "execute": "query-sgx-capabilities" }
411 # <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : true,
413 # "section" : [{"node": 0, "size": 67108864},
414 # {"node": 1, "size": 29360128}]} }
416 { 'command': 'query-sgx-capabilities', 'returns': 'SGXInfo', 'if': 'TARGET_I386' }
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).
438 { 'enum': 'EvtchnPortType',
439 'data': ['closed', 'unbound', 'interdomain', 'pirq', 'virq', 'ipi'],
440 'if': 'TARGET_I386' }
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
463 { 'struct': 'EvtchnInfo',
464 'data': {'port': 'uint16',
466 'type': 'EvtchnPortType',
467 'remote-domain': 'str',
471 'if': 'TARGET_I386' }
477 # Query the Xen event channels opened by the guest.
479 # Returns: list of open event channel ports.
485 # -> { "execute": "xen-event-list" }
491 # "remote-domain": "qemu",
493 # "type": "interdomain",
500 # "remote-domain": "",
508 { 'command': 'xen-event-list',
509 'returns': ['EvtchnInfo'],
510 'if': 'TARGET_I386' }
515 # Inject a Xen event channel port (interrupt) to the guest.
517 # @port: The port number
523 # -> { "execute": "xen-event-inject", "arguments": { "port": 1 } }
524 # <- { "return": { } }
526 { 'command': 'xen-event-inject',
527 'data': { 'port': 'uint32' },
528 'if': 'TARGET_I386' }