]> git.proxmox.com Git - mirror_qemu.git/blame - qapi/misc-target.json
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
[mirror_qemu.git] / qapi / misc-target.json
CommitLineData
61eb9e80
MA
1# -*- Mode: Python -*-
2#
3
183e4281
MAL
4##
5# @RTC_CHANGE:
6#
7# Emitted when the guest changes the RTC time.
8#
9# @offset: offset between base RTC clock (as specified by -rtc base), and
10# new RTC clock value
11#
12# Note: This event is rate-limited.
13#
14# Since: 0.13.0
15#
16# Example:
17#
18# <- { "event": "RTC_CHANGE",
19# "data": { "offset": 78 },
20# "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
21#
22##
23{ 'event': 'RTC_CHANGE',
24 'data': { 'offset': 'int' },
25 'if': 'defined(TARGET_ALPHA) || defined(TARGET_ARM) || defined(TARGET_HPPA) || defined(TARGET_I386) || defined(TARGET_MIPS) || defined(TARGET_MIPS64) || defined(TARGET_MOXIE) || defined(TARGET_PPC) || defined(TARGET_PPC64) || defined(TARGET_S390X) || defined(TARGET_SH4) || defined(TARGET_SPARC)' }
26
61eb9e80 27##
a6c7040f
MAL
28# @rtc-reset-reinjection:
29#
30# This command will reset the RTC interrupt reinjection backlog.
31# Can be used if another mechanism to synchronize guest time
32# is in effect, for example QEMU guest agent's guest-set-time
33# command.
34#
35# Since: 2.1
36#
37# Example:
38#
39# -> { "execute": "rtc-reset-reinjection" }
40# <- { "return": {} }
41#
42##
43{ 'command': 'rtc-reset-reinjection',
44 'if': 'defined(TARGET_I386)' }
45
46
47##
48# @SevState:
49#
50# An enumeration of SEV state information used during @query-sev.
51#
52# @uninit: The guest is uninitialized.
53#
54# @launch-update: The guest is currently being launched; plaintext data and
55# register state is being imported.
56#
57# @launch-secret: The guest is currently being launched; ciphertext data
58# is being imported.
59#
60# @running: The guest is fully launched or migrated in.
61#
62# @send-update: The guest is currently being migrated out to another machine.
63#
64# @receive-update: The guest is currently being migrated from another machine.
65#
66# Since: 2.12
67##
68{ 'enum': 'SevState',
69 'data': ['uninit', 'launch-update', 'launch-secret', 'running',
70 'send-update', 'receive-update' ],
71 'if': 'defined(TARGET_I386)' }
72
73##
74# @SevInfo:
75#
76# Information about Secure Encrypted Virtualization (SEV) support
77#
78# @enabled: true if SEV is active
79#
80# @api-major: SEV API major version
81#
82# @api-minor: SEV API minor version
83#
84# @build-id: SEV FW build id
85#
86# @policy: SEV policy value
87#
88# @state: SEV guest state
89#
90# @handle: SEV firmware handle
91#
92# Since: 2.12
93##
94{ 'struct': 'SevInfo',
95 'data': { 'enabled': 'bool',
96 'api-major': 'uint8',
97 'api-minor' : 'uint8',
98 'build-id' : 'uint8',
99 'policy' : 'uint32',
100 'state' : 'SevState',
101 'handle' : 'uint32'
102 },
103 'if': 'defined(TARGET_I386)'
104}
105
106##
107# @query-sev:
108#
109# Returns information about SEV
110#
111# Returns: @SevInfo
112#
113# Since: 2.12
114#
115# Example:
116#
117# -> { "execute": "query-sev" }
118# <- { "return": { "enabled": true, "api-major" : 0, "api-minor" : 0,
119# "build-id" : 0, "policy" : 0, "state" : "running",
120# "handle" : 1 } }
121#
122##
123{ 'command': 'query-sev', 'returns': 'SevInfo',
124 'if': 'defined(TARGET_I386)' }
125
126
127##
128# @SevLaunchMeasureInfo:
129#
130# SEV Guest Launch measurement information
131#
132# @data: the measurement value encoded in base64
133#
134# Since: 2.12
135#
136##
137{ 'struct': 'SevLaunchMeasureInfo', 'data': {'data': 'str'},
138 'if': 'defined(TARGET_I386)' }
139
140##
141# @query-sev-launch-measure:
142#
143# Query the SEV guest launch information.
144#
145# Returns: The @SevLaunchMeasureInfo for the guest
146#
147# Since: 2.12
148#
149# Example:
150#
151# -> { "execute": "query-sev-launch-measure" }
152# <- { "return": { "data": "4l8LXeNlSPUDlXPJG5966/8%YZ" } }
153#
154##
155{ 'command': 'query-sev-launch-measure', 'returns': 'SevLaunchMeasureInfo',
156 'if': 'defined(TARGET_I386)' }
157
158
159##
160# @SevCapability:
161#
162# The struct describes capability for a Secure Encrypted Virtualization
163# feature.
164#
165# @pdh: Platform Diffie-Hellman key (base64 encoded)
166#
167# @cert-chain: PDH certificate chain (base64 encoded)
168#
169# @cbitpos: C-bit location in page table entry
170#
171# @reduced-phys-bits: Number of physical Address bit reduction when SEV is
172# enabled
173#
174# Since: 2.12
175##
176{ 'struct': 'SevCapability',
177 'data': { 'pdh': 'str',
178 'cert-chain': 'str',
179 'cbitpos': 'int',
180 'reduced-phys-bits': 'int'},
181 'if': 'defined(TARGET_I386)' }
182
183##
184# @query-sev-capabilities:
185#
186# This command is used to get the SEV capabilities, and is supported on AMD
187# X86 platforms only.
188#
189# Returns: SevCapability objects.
190#
191# Since: 2.12
192#
193# Example:
194#
195# -> { "execute": "query-sev-capabilities" }
196# <- { "return": { "pdh": "8CCDD8DDD", "cert-chain": "888CCCDDDEE",
197# "cbitpos": 47, "reduced-phys-bits": 5}}
198#
61eb9e80 199##
a6c7040f
MAL
200{ 'command': 'query-sev-capabilities', 'returns': 'SevCapability',
201 'if': 'defined(TARGET_I386)' }
0e2f4530
MAL
202
203##
204# @dump-skeys:
205#
206# Dump guest's storage keys
207#
208# @filename: the path to the file to dump to
209#
210# This command is only supported on s390 architecture.
211#
212# Since: 2.5
213#
214# Example:
215#
216# -> { "execute": "dump-skeys",
217# "arguments": { "filename": "/tmp/skeys" } }
218# <- { "return": {} }
219#
220##
221{ 'command': 'dump-skeys',
222 'data': { 'filename': 'str' },
223 'if': 'defined(TARGET_S390X)' }
224
84c6499e
MAL
225##
226# @GICCapability:
227#
228# The struct describes capability for a specific GIC (Generic
229# Interrupt Controller) version. These bits are not only decided by
230# QEMU/KVM software version, but also decided by the hardware that
231# the program is running upon.
232#
233# @version: version of GIC to be described. Currently, only 2 and 3
234# are supported.
235#
236# @emulated: whether current QEMU/hardware supports emulated GIC
237# device in user space.
238#
239# @kernel: whether current QEMU/hardware supports hardware
240# accelerated GIC device in kernel.
241#
242# Since: 2.6
243##
244{ 'struct': 'GICCapability',
245 'data': { 'version': 'int',
246 'emulated': 'bool',
247 'kernel': 'bool' },
248 'if': 'defined(TARGET_ARM)' }
249
250##
251# @query-gic-capabilities:
252#
253# This command is ARM-only. It will return a list of GICCapability
254# objects that describe its capability bits.
255#
256# Returns: a list of GICCapability objects.
257#
258# Since: 2.6
259#
260# Example:
261#
262# -> { "execute": "query-gic-capabilities" }
263# <- { "return": [{ "version": 2, "emulated": true, "kernel": false },
264# { "version": 3, "emulated": false, "kernel": true } ] }
265#
266##
267{ 'command': 'query-gic-capabilities', 'returns': ['GICCapability'],
268 'if': 'defined(TARGET_ARM)' }