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 # Information about Secure Encrypted Virtualization (SEV) support
55 # @enabled: true if SEV is active
57 # @api-major: SEV API major version
59 # @api-minor: SEV API minor version
61 # @build-id: SEV FW build id
63 # @policy: SEV policy value
65 # @state: SEV guest state
67 # @handle: SEV firmware handle
71 { 'struct': 'SevInfo',
72 'data': { 'enabled': 'bool',
74 'api-minor' : 'uint8',
86 # Returns information about SEV
94 # -> { "execute": "query-sev" }
95 # <- { "return": { "enabled": true, "api-major" : 0, "api-minor" : 0,
96 # "build-id" : 0, "policy" : 0, "state" : "running",
99 { 'command': 'query-sev', 'returns': 'SevInfo',
100 'if': 'TARGET_I386' }
103 # @SevLaunchMeasureInfo:
105 # SEV Guest Launch measurement information
107 # @data: the measurement value encoded in base64
111 { 'struct': 'SevLaunchMeasureInfo', 'data': {'data': 'str'},
112 'if': 'TARGET_I386' }
115 # @query-sev-launch-measure:
117 # Query the SEV guest launch information.
119 # Returns: The @SevLaunchMeasureInfo for the guest
125 # -> { "execute": "query-sev-launch-measure" }
126 # <- { "return": { "data": "4l8LXeNlSPUDlXPJG5966/8%YZ" } }
128 { 'command': 'query-sev-launch-measure', 'returns': 'SevLaunchMeasureInfo',
129 'if': 'TARGET_I386' }
134 # The struct describes capability for a Secure Encrypted
135 # Virtualization feature.
137 # @pdh: Platform Diffie-Hellman key (base64 encoded)
139 # @cert-chain: PDH certificate chain (base64 encoded)
141 # @cpu0-id: Unique ID of CPU0 (base64 encoded) (since 7.1)
143 # @cbitpos: C-bit location in page table entry
145 # @reduced-phys-bits: Number of physical Address bit reduction when
150 { 'struct': 'SevCapability',
151 'data': { 'pdh': 'str',
155 'reduced-phys-bits': 'int'},
156 'if': 'TARGET_I386' }
159 # @query-sev-capabilities:
161 # This command is used to get the SEV capabilities, and is supported
162 # on AMD X86 platforms only.
164 # Returns: SevCapability objects.
170 # -> { "execute": "query-sev-capabilities" }
171 # <- { "return": { "pdh": "8CCDD8DDD", "cert-chain": "888CCCDDDEE",
172 # "cpu0-id": "2lvmGwo+...61iEinw==",
173 # "cbitpos": 47, "reduced-phys-bits": 1}}
175 { 'command': 'query-sev-capabilities', 'returns': 'SevCapability',
176 'if': 'TARGET_I386' }
179 # @sev-inject-launch-secret:
181 # This command injects a secret blob into memory of SEV guest.
183 # @packet-header: the launch secret packet header encoded in base64
185 # @secret: the launch secret data to be injected encoded in base64
187 # @gpa: the guest physical address where secret will be injected.
191 { 'command': 'sev-inject-launch-secret',
192 'data': { 'packet-header': 'str', 'secret': 'str', '*gpa': 'uint64' },
193 'if': 'TARGET_I386' }
196 # @SevAttestationReport:
198 # The struct describes attestation report for a Secure Encrypted
199 # Virtualization feature.
201 # @data: guest attestation report (base64 encoded)
205 { 'struct': 'SevAttestationReport',
206 'data': { 'data': 'str'},
207 'if': 'TARGET_I386' }
210 # @query-sev-attestation-report:
212 # This command is used to get the SEV attestation report, and is
213 # supported on AMD X86 platforms only.
215 # @mnonce: a random 16 bytes value encoded in base64 (it will be
216 # included in report)
218 # Returns: SevAttestationReport objects.
224 # -> { "execute" : "query-sev-attestation-report",
225 # "arguments": { "mnonce": "aaaaaaa" } }
226 # <- { "return" : { "data": "aaaaaaaabbbddddd"} }
228 { 'command': 'query-sev-attestation-report',
229 'data': { 'mnonce': 'str' },
230 'returns': 'SevAttestationReport',
231 'if': 'TARGET_I386' }
236 # Dump guest's storage keys
238 # @filename: the path to the file to dump to
240 # This command is only supported on s390 architecture.
246 # -> { "execute": "dump-skeys",
247 # "arguments": { "filename": "/tmp/skeys" } }
248 # <- { "return": {} }
250 { 'command': 'dump-skeys',
251 'data': { 'filename': 'str' },
252 'if': 'TARGET_S390X' }
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 the
260 # program is running upon.
262 # @version: version of GIC to be described. Currently, only 2 and 3
265 # @emulated: whether current QEMU/hardware supports emulated GIC
266 # device in user space.
268 # @kernel: whether current QEMU/hardware supports hardware accelerated
269 # GIC device in kernel.
273 { 'struct': 'GICCapability',
274 'data': { 'version': 'int',
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.
291 # -> { "execute": "query-gic-capabilities" }
292 # <- { "return": [{ "version": 2, "emulated": true, "kernel": false },
293 # { "version": 3, "emulated": false, "kernel": true } ] }
295 { 'command': 'query-gic-capabilities', 'returns': ['GICCapability'],
301 # Information about intel SGX EPC section info
303 # @node: the numa node
305 # @size: the size of EPC section
309 { 'struct': 'SGXEPCSection',
310 'data': { 'node': 'int',
316 # Information about intel Safe Guard eXtension (SGX) support
318 # @sgx: true if SGX is supported
320 # @sgx1: true if SGX1 is supported
322 # @sgx2: true if SGX2 is supported
324 # @flc: true if FLC is supported
326 # @sections: The EPC sections info for guest (Since: 7.0)
330 { 'struct': 'SGXInfo',
331 'data': { 'sgx': 'bool',
335 'sections': ['SGXEPCSection']},
336 'if': 'TARGET_I386' }
341 # Returns information about SGX
349 # -> { "execute": "query-sgx" }
350 # <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : true,
352 # "sections": [{"node": 0, "size": 67108864},
353 # {"node": 1, "size": 29360128}]} }
355 { 'command': 'query-sgx', 'returns': 'SGXInfo', 'if': 'TARGET_I386' }
358 # @query-sgx-capabilities:
360 # Returns information from host SGX capabilities
368 # -> { "execute": "query-sgx-capabilities" }
369 # <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : true,
371 # "section" : [{"node": 0, "size": 67108864},
372 # {"node": 1, "size": 29360128}]} }
374 { 'command': 'query-sgx-capabilities', 'returns': 'SGXInfo', 'if': 'TARGET_I386' }
380 # An enumeration of Xen event channel port types.
382 # @closed: The port is unused.
384 # @unbound: The port is allocated and ready to be bound.
386 # @interdomain: The port is connected as an interdomain interrupt.
388 # @pirq: The port is bound to a physical IRQ (PIRQ).
390 # @virq: The port is bound to a virtual IRQ (VIRQ).
392 # @ipi: The post is an inter-processor interrupt (IPI).
396 { 'enum': 'EvtchnPortType',
397 'data': ['closed', 'unbound', 'interdomain', 'pirq', 'virq', 'ipi'],
398 'if': 'TARGET_I386' }
403 # Information about a Xen event channel port
405 # @port: the port number
407 # @vcpu: target vCPU for this port
409 # @type: the port type
411 # @remote-domain: remote domain for interdomain ports
413 # @target: remote port ID, or virq/pirq number
415 # @pending: port is currently active pending delivery
417 # @masked: port is masked
421 { 'struct': 'EvtchnInfo',
422 'data': {'port': 'uint16',
424 'type': 'EvtchnPortType',
425 'remote-domain': 'str',
429 'if': 'TARGET_I386' }
435 # Query the Xen event channels opened by the guest.
437 # Returns: list of open event channel ports.
443 # -> { "execute": "xen-event-list" }
449 # "remote-domain": "qemu",
451 # "type": "interdomain",
458 # "remote-domain": "",
466 { 'command': 'xen-event-list',
467 'returns': ['EvtchnInfo'],
468 'if': 'TARGET_I386' }
473 # Inject a Xen event channel port (interrupt) to the guest.
475 # @port: The port number
478 # - Nothing on success.
484 # -> { "execute": "xen-event-inject", "arguments": { "port": 1 } }
485 # <- { "return": { } }
487 { 'command': 'xen-event-inject',
488 'data': { 'port': 'uint32' },
489 'if': 'TARGET_I386' }