5 # = Target-specific commands & events
8 { 'include': 'misc.json' }
11 # @rtc-reset-reinjection:
13 # This command will reset the RTC interrupt reinjection backlog.
14 # Can be used if another mechanism to synchronize guest time
15 # is in effect, for example QEMU guest agent's guest-set-time
22 # -> { "execute": "rtc-reset-reinjection" }
26 { 'command': 'rtc-reset-reinjection',
27 'if': 'defined(TARGET_I386)' }
33 # An enumeration of SEV state information used during @query-sev.
35 # @uninit: The guest is uninitialized.
37 # @launch-update: The guest is currently being launched; plaintext data and
38 # register state is being imported.
40 # @launch-secret: The guest is currently being launched; ciphertext data
43 # @running: The guest is fully launched or migrated in.
45 # @send-update: The guest is currently being migrated out to another machine.
47 # @receive-update: The guest is currently being migrated from another machine.
52 'data': ['uninit', 'launch-update', 'launch-secret', 'running',
53 'send-update', 'receive-update' ],
54 'if': 'defined(TARGET_I386)' }
59 # Information about Secure Encrypted Virtualization (SEV) support
61 # @enabled: true if SEV is active
63 # @api-major: SEV API major version
65 # @api-minor: SEV API minor version
67 # @build-id: SEV FW build id
69 # @policy: SEV policy value
71 # @state: SEV guest state
73 # @handle: SEV firmware handle
77 { 'struct': 'SevInfo',
78 'data': { 'enabled': 'bool',
80 'api-minor' : 'uint8',
86 'if': 'defined(TARGET_I386)'
92 # Returns information about SEV
100 # -> { "execute": "query-sev" }
101 # <- { "return": { "enabled": true, "api-major" : 0, "api-minor" : 0,
102 # "build-id" : 0, "policy" : 0, "state" : "running",
106 { 'command': 'query-sev', 'returns': 'SevInfo',
107 'if': 'defined(TARGET_I386)' }
111 # @SevLaunchMeasureInfo:
113 # SEV Guest Launch measurement information
115 # @data: the measurement value encoded in base64
120 { 'struct': 'SevLaunchMeasureInfo', 'data': {'data': 'str'},
121 'if': 'defined(TARGET_I386)' }
124 # @query-sev-launch-measure:
126 # Query the SEV guest launch information.
128 # Returns: The @SevLaunchMeasureInfo for the guest
134 # -> { "execute": "query-sev-launch-measure" }
135 # <- { "return": { "data": "4l8LXeNlSPUDlXPJG5966/8%YZ" } }
138 { 'command': 'query-sev-launch-measure', 'returns': 'SevLaunchMeasureInfo',
139 'if': 'defined(TARGET_I386)' }
145 # The struct describes capability for a Secure Encrypted Virtualization
148 # @pdh: Platform Diffie-Hellman key (base64 encoded)
150 # @cert-chain: PDH certificate chain (base64 encoded)
152 # @cbitpos: C-bit location in page table entry
154 # @reduced-phys-bits: Number of physical Address bit reduction when SEV is
159 { 'struct': 'SevCapability',
160 'data': { 'pdh': 'str',
163 'reduced-phys-bits': 'int'},
164 'if': 'defined(TARGET_I386)' }
167 # @query-sev-capabilities:
169 # This command is used to get the SEV capabilities, and is supported on AMD
170 # X86 platforms only.
172 # Returns: SevCapability objects.
178 # -> { "execute": "query-sev-capabilities" }
179 # <- { "return": { "pdh": "8CCDD8DDD", "cert-chain": "888CCCDDDEE",
180 # "cbitpos": 47, "reduced-phys-bits": 5}}
183 { 'command': 'query-sev-capabilities', 'returns': 'SevCapability',
184 'if': 'defined(TARGET_I386)' }
189 # Dump guest's storage keys
191 # @filename: the path to the file to dump to
193 # This command is only supported on s390 architecture.
199 # -> { "execute": "dump-skeys",
200 # "arguments": { "filename": "/tmp/skeys" } }
201 # <- { "return": {} }
204 { 'command': 'dump-skeys',
205 'data': { 'filename': 'str' },
206 'if': 'defined(TARGET_S390X)' }
209 # @CpuModelBaselineInfo:
211 # The result of a CPU model baseline.
213 # @model: the baselined CpuModelInfo.
217 { 'struct': 'CpuModelBaselineInfo',
218 'data': { 'model': 'CpuModelInfo' },
219 'if': 'defined(TARGET_S390X)' }
222 # @CpuModelCompareInfo:
224 # The result of a CPU model comparison.
226 # @result: The result of the compare operation.
227 # @responsible-properties: List of properties that led to the comparison result
228 # not being identical.
230 # @responsible-properties is a list of QOM property names that led to
231 # both CPUs not being detected as identical. For identical models, this
233 # If a QOM property is read-only, that means there's no known way to make the
234 # CPU models identical. If the special property name "type" is included, the
235 # models are by definition not identical and cannot be made identical.
239 { 'struct': 'CpuModelCompareInfo',
240 'data': { 'result': 'CpuModelCompareResult',
241 'responsible-properties': ['str'] },
242 'if': 'defined(TARGET_S390X)' }
245 # @query-cpu-model-comparison:
247 # Compares two CPU models, returning how they compare in a specific
248 # configuration. The results indicates how both models compare regarding
249 # runnability. This result can be used by tooling to make decisions if a
250 # certain CPU model will run in a certain configuration or if a compatible
251 # CPU model has to be created by baselining.
253 # Usually, a CPU model is compared against the maximum possible CPU model
254 # of a certain configuration (e.g. the "host" model for KVM). If that CPU
255 # model is identical or a subset, it will run in that configuration.
257 # The result returned by this command may be affected by:
259 # * QEMU version: CPU models may look different depending on the QEMU version.
260 # (Except for CPU models reported as "static" in query-cpu-definitions.)
261 # * machine-type: CPU model may look different depending on the machine-type.
262 # (Except for CPU models reported as "static" in query-cpu-definitions.)
263 # * machine options (including accelerator): in some architectures, CPU models
264 # may look different depending on machine and accelerator options. (Except for
265 # CPU models reported as "static" in query-cpu-definitions.)
266 # * "-cpu" arguments and global properties: arguments to the -cpu option and
267 # global properties may affect expansion of CPU models. Using
268 # query-cpu-model-expansion while using these is not advised.
270 # Some architectures may not support comparing CPU models. s390x supports
271 # comparing CPU models.
273 # Returns: a CpuModelBaselineInfo. Returns an error if comparing CPU models is
274 # not supported, if a model cannot be used, if a model contains
275 # an unknown cpu definition name, unknown properties or properties
280 { 'command': 'query-cpu-model-comparison',
281 'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' },
282 'returns': 'CpuModelCompareInfo',
283 'if': 'defined(TARGET_S390X)' }
286 # @query-cpu-model-baseline:
288 # Baseline two CPU models, creating a compatible third model. The created
289 # model will always be a static, migration-safe CPU model (see "static"
290 # CPU model expansion for details).
292 # This interface can be used by tooling to create a compatible CPU model out
293 # two CPU models. The created CPU model will be identical to or a subset of
294 # both CPU models when comparing them. Therefore, the created CPU model is
295 # guaranteed to run where the given CPU models run.
297 # The result returned by this command may be affected by:
299 # * QEMU version: CPU models may look different depending on the QEMU version.
300 # (Except for CPU models reported as "static" in query-cpu-definitions.)
301 # * machine-type: CPU model may look different depending on the machine-type.
302 # (Except for CPU models reported as "static" in query-cpu-definitions.)
303 # * machine options (including accelerator): in some architectures, CPU models
304 # may look different depending on machine and accelerator options. (Except for
305 # CPU models reported as "static" in query-cpu-definitions.)
306 # * "-cpu" arguments and global properties: arguments to the -cpu option and
307 # global properties may affect expansion of CPU models. Using
308 # query-cpu-model-expansion while using these is not advised.
310 # Some architectures may not support baselining CPU models. s390x supports
311 # baselining CPU models.
313 # Returns: a CpuModelBaselineInfo. Returns an error if baselining CPU models is
314 # not supported, if a model cannot be used, if a model contains
315 # an unknown cpu definition name, unknown properties or properties
320 { 'command': 'query-cpu-model-baseline',
321 'data': { 'modela': 'CpuModelInfo',
322 'modelb': 'CpuModelInfo' },
323 'returns': 'CpuModelBaselineInfo',
324 'if': 'defined(TARGET_S390X)' }