8 # Emitted when the guest changes the RTC time.
10 # @offset: offset between base RTC clock (as specified by -rtc base), and
13 # Note: This event is rate-limited.
19 # <- { "event": "RTC_CHANGE",
20 # "data": { "offset": 78 },
21 # "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
24 { 'event': 'RTC_CHANGE',
25 'data': { 'offset': 'int' },
26 '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)' }
29 # @rtc-reset-reinjection:
31 # This command will reset the RTC interrupt reinjection backlog.
32 # Can be used if another mechanism to synchronize guest time
33 # is in effect, for example QEMU guest agent's guest-set-time
40 # -> { "execute": "rtc-reset-reinjection" }
44 { 'command': 'rtc-reset-reinjection',
45 'if': 'defined(TARGET_I386)' }
51 # An enumeration of SEV state information used during @query-sev.
53 # @uninit: The guest is uninitialized.
55 # @launch-update: The guest is currently being launched; plaintext data and
56 # register state is being imported.
58 # @launch-secret: The guest is currently being launched; ciphertext data
61 # @running: The guest is fully launched or migrated in.
63 # @send-update: The guest is currently being migrated out to another machine.
65 # @receive-update: The guest is currently being migrated from another machine.
70 'data': ['uninit', 'launch-update', 'launch-secret', 'running',
71 'send-update', 'receive-update' ],
72 'if': 'defined(TARGET_I386)' }
77 # Information about Secure Encrypted Virtualization (SEV) support
79 # @enabled: true if SEV is active
81 # @api-major: SEV API major version
83 # @api-minor: SEV API minor version
85 # @build-id: SEV FW build id
87 # @policy: SEV policy value
89 # @state: SEV guest state
91 # @handle: SEV firmware handle
95 { 'struct': 'SevInfo',
96 'data': { 'enabled': 'bool',
98 'api-minor' : 'uint8',
101 'state' : 'SevState',
104 'if': 'defined(TARGET_I386)'
110 # Returns information about SEV
118 # -> { "execute": "query-sev" }
119 # <- { "return": { "enabled": true, "api-major" : 0, "api-minor" : 0,
120 # "build-id" : 0, "policy" : 0, "state" : "running",
124 { 'command': 'query-sev', 'returns': 'SevInfo',
125 'if': 'defined(TARGET_I386)' }
129 # @SevLaunchMeasureInfo:
131 # SEV Guest Launch measurement information
133 # @data: the measurement value encoded in base64
138 { 'struct': 'SevLaunchMeasureInfo', 'data': {'data': 'str'},
139 'if': 'defined(TARGET_I386)' }
142 # @query-sev-launch-measure:
144 # Query the SEV guest launch information.
146 # Returns: The @SevLaunchMeasureInfo for the guest
152 # -> { "execute": "query-sev-launch-measure" }
153 # <- { "return": { "data": "4l8LXeNlSPUDlXPJG5966/8%YZ" } }
156 { 'command': 'query-sev-launch-measure', 'returns': 'SevLaunchMeasureInfo',
157 'if': 'defined(TARGET_I386)' }
163 # The struct describes capability for a Secure Encrypted Virtualization
166 # @pdh: Platform Diffie-Hellman key (base64 encoded)
168 # @cert-chain: PDH certificate chain (base64 encoded)
170 # @cbitpos: C-bit location in page table entry
172 # @reduced-phys-bits: Number of physical Address bit reduction when SEV is
177 { 'struct': 'SevCapability',
178 'data': { 'pdh': 'str',
181 'reduced-phys-bits': 'int'},
182 'if': 'defined(TARGET_I386)' }
185 # @query-sev-capabilities:
187 # This command is used to get the SEV capabilities, and is supported on AMD
188 # X86 platforms only.
190 # Returns: SevCapability objects.
196 # -> { "execute": "query-sev-capabilities" }
197 # <- { "return": { "pdh": "8CCDD8DDD", "cert-chain": "888CCCDDDEE",
198 # "cbitpos": 47, "reduced-phys-bits": 5}}
201 { 'command': 'query-sev-capabilities', 'returns': 'SevCapability',
202 'if': 'defined(TARGET_I386)' }
205 # @sev-inject-launch-secret:
207 # This command injects a secret blob into memory of SEV guest.
209 # @packet-header: the launch secret packet header encoded in base64
211 # @secret: the launch secret data to be injected encoded in base64
213 # @gpa: the guest physical address where secret will be injected.
218 { 'command': 'sev-inject-launch-secret',
219 'data': { 'packet-header': 'str', 'secret': 'str', 'gpa': 'uint64' },
220 'if': 'defined(TARGET_I386)' }
225 # Dump guest's storage keys
227 # @filename: the path to the file to dump to
229 # This command is only supported on s390 architecture.
235 # -> { "execute": "dump-skeys",
236 # "arguments": { "filename": "/tmp/skeys" } }
237 # <- { "return": {} }
240 { 'command': 'dump-skeys',
241 'data': { 'filename': 'str' },
242 'if': 'defined(TARGET_S390X)' }
247 # The struct describes capability for a specific GIC (Generic
248 # Interrupt Controller) version. These bits are not only decided by
249 # QEMU/KVM software version, but also decided by the hardware that
250 # the program is running upon.
252 # @version: version of GIC to be described. Currently, only 2 and 3
255 # @emulated: whether current QEMU/hardware supports emulated GIC
256 # device in user space.
258 # @kernel: whether current QEMU/hardware supports hardware
259 # accelerated GIC device in kernel.
263 { 'struct': 'GICCapability',
264 'data': { 'version': 'int',
267 'if': 'defined(TARGET_ARM)' }
270 # @query-gic-capabilities:
272 # This command is ARM-only. It will return a list of GICCapability
273 # objects that describe its capability bits.
275 # Returns: a list of GICCapability objects.
281 # -> { "execute": "query-gic-capabilities" }
282 # <- { "return": [{ "version": 2, "emulated": true, "kernel": false },
283 # { "version": 3, "emulated": false, "kernel": true } ] }
286 { 'command': 'query-gic-capabilities', 'returns': ['GICCapability'],
287 'if': 'defined(TARGET_ARM)' }