misc-target.json (9674B)
1# -*- Mode: Python -*- 2# vim: filetype=python 3# 4 5## 6# @RTC_CHANGE: 7# 8# Emitted when the guest changes the RTC time. 9# 10# @offset: offset between base RTC clock (as specified by -rtc base), and 11# new RTC clock value 12# 13# Note: This event is rate-limited. 14# 15# Since: 0.13 16# 17# Example: 18# 19# <- { "event": "RTC_CHANGE", 20# "data": { "offset": 78 }, 21# "timestamp": { "seconds": 1267020223, "microseconds": 435656 } } 22# 23## 24{ 'event': 'RTC_CHANGE', 25 'data': { 'offset': 'int' }, 26 'if': { 'any': [ 'TARGET_ALPHA', 27 'TARGET_ARM', 28 'TARGET_HPPA', 29 'TARGET_I386', 30 'TARGET_MIPS', 31 'TARGET_MIPS64', 32 'TARGET_PPC', 33 'TARGET_PPC64', 34 'TARGET_S390X', 35 'TARGET_SH4', 36 'TARGET_SPARC' ] } } 37 38## 39# @rtc-reset-reinjection: 40# 41# This command will reset the RTC interrupt reinjection backlog. 42# Can be used if another mechanism to synchronize guest time 43# is in effect, for example QEMU guest agent's guest-set-time 44# command. 45# 46# Since: 2.1 47# 48# Example: 49# 50# -> { "execute": "rtc-reset-reinjection" } 51# <- { "return": {} } 52# 53## 54{ 'command': 'rtc-reset-reinjection', 55 'if': 'TARGET_I386' } 56 57 58## 59# @SevState: 60# 61# An enumeration of SEV state information used during @query-sev. 62# 63# @uninit: The guest is uninitialized. 64# 65# @launch-update: The guest is currently being launched; plaintext data and 66# register state is being imported. 67# 68# @launch-secret: The guest is currently being launched; ciphertext data 69# is being imported. 70# 71# @running: The guest is fully launched or migrated in. 72# 73# @send-update: The guest is currently being migrated out to another machine. 74# 75# @receive-update: The guest is currently being migrated from another machine. 76# 77# Since: 2.12 78## 79{ 'enum': 'SevState', 80 'data': ['uninit', 'launch-update', 'launch-secret', 'running', 81 'send-update', 'receive-update' ], 82 'if': 'TARGET_I386' } 83 84## 85# @SevGuestType: 86# 87# An enumeration indicating the type of SEV guest being run. 88# 89# @sev: The guest is a legacy SEV or SEV-ES guest. 90# @sev-snp: The guest is an SEV-SNP guest. 91# 92# Since: 6.2 93## 94{ 'enum': 'SevGuestType', 95 'data': [ 'sev', 'sev-snp' ], 96 'if': 'TARGET_I386' } 97 98## 99# @SevGuestInfo: 100# 101# Information specific to legacy SEV/SEV-ES guests. 102# 103# @policy: SEV policy value 104# 105# @handle: SEV firmware handle 106# 107# Since: 2.12 108## 109{ 'struct': 'SevGuestInfo', 110 'data': { 'policy': 'uint32', 111 'handle': 'uint32' }, 112 'if': 'TARGET_I386' } 113 114## 115# @SevSnpGuestInfo: 116# 117# Information specific to SEV-SNP guests. 118# 119# @snp-policy: SEV-SNP policy value 120# 121# Since: 6.2 122## 123{ 'struct': 'SevSnpGuestInfo', 124 'data': { 'snp-policy': 'uint64' }, 125 'if': 'TARGET_I386' } 126 127## 128# @SevInfo: 129# 130# Information about Secure Encrypted Virtualization (SEV) support 131# 132# @enabled: true if SEV is active 133# 134# @api-major: SEV API major version 135# 136# @api-minor: SEV API minor version 137# 138# @build-id: SEV FW build id 139# 140# @state: SEV guest state 141# 142# @sev-type: Type of SEV guest being run 143# 144# Since: 2.12 145## 146{ 'union': 'SevInfo', 147 'base': { 'enabled': 'bool', 148 'api-major': 'uint8', 149 'api-minor' : 'uint8', 150 'build-id' : 'uint8', 151 'state' : 'SevState', 152 'sev-type' : 'SevGuestType' }, 153 'discriminator': 'sev-type', 154 'data': { 155 'sev': 'SevGuestInfo', 156 'sev-snp': 'SevSnpGuestInfo' }, 157 'if': 'TARGET_I386' } 158 159 160## 161# @query-sev: 162# 163# Returns information about SEV 164# 165# Returns: @SevInfo 166# 167# Since: 2.12 168# 169# Example: 170# 171# -> { "execute": "query-sev" } 172# <- { "return": { "enabled": true, "api-major" : 0, "api-minor" : 0, 173# "build-id" : 0, "policy" : 0, "state" : "running", 174# "handle" : 1 } } 175# 176## 177{ 'command': 'query-sev', 'returns': 'SevInfo', 178 'if': 'TARGET_I386' } 179 180 181## 182# @SevLaunchMeasureInfo: 183# 184# SEV Guest Launch measurement information 185# 186# @data: the measurement value encoded in base64 187# 188# Since: 2.12 189# 190## 191{ 'struct': 'SevLaunchMeasureInfo', 'data': {'data': 'str'}, 192 'if': 'TARGET_I386' } 193 194## 195# @query-sev-launch-measure: 196# 197# Query the SEV guest launch information. 198# 199# Returns: The @SevLaunchMeasureInfo for the guest 200# 201# Since: 2.12 202# 203# Example: 204# 205# -> { "execute": "query-sev-launch-measure" } 206# <- { "return": { "data": "4l8LXeNlSPUDlXPJG5966/8%YZ" } } 207# 208## 209{ 'command': 'query-sev-launch-measure', 'returns': 'SevLaunchMeasureInfo', 210 'if': 'TARGET_I386' } 211 212 213## 214# @SevCapability: 215# 216# The struct describes capability for a Secure Encrypted Virtualization 217# feature. 218# 219# @pdh: Platform Diffie-Hellman key (base64 encoded) 220# 221# @cert-chain: PDH certificate chain (base64 encoded) 222# 223# @cbitpos: C-bit location in page table entry 224# 225# @reduced-phys-bits: Number of physical Address bit reduction when SEV is 226# enabled 227# 228# Since: 2.12 229## 230{ 'struct': 'SevCapability', 231 'data': { 'pdh': 'str', 232 'cert-chain': 'str', 233 'cbitpos': 'int', 234 'reduced-phys-bits': 'int'}, 235 'if': 'TARGET_I386' } 236 237## 238# @query-sev-capabilities: 239# 240# This command is used to get the SEV capabilities, and is supported on AMD 241# X86 platforms only. 242# 243# Returns: SevCapability objects. 244# 245# Since: 2.12 246# 247# Example: 248# 249# -> { "execute": "query-sev-capabilities" } 250# <- { "return": { "pdh": "8CCDD8DDD", "cert-chain": "888CCCDDDEE", 251# "cbitpos": 47, "reduced-phys-bits": 5}} 252# 253## 254{ 'command': 'query-sev-capabilities', 'returns': 'SevCapability', 255 'if': 'TARGET_I386' } 256 257## 258# @sev-inject-launch-secret: 259# 260# This command injects a secret blob into memory of SEV guest. 261# 262# @packet-header: the launch secret packet header encoded in base64 263# 264# @secret: the launch secret data to be injected encoded in base64 265# 266# @gpa: the guest physical address where secret will be injected. 267# 268# Since: 6.0 269# 270## 271{ 'command': 'sev-inject-launch-secret', 272 'data': { 'packet-header': 'str', 'secret': 'str', '*gpa': 'uint64' }, 273 'if': 'TARGET_I386' } 274 275## 276# @dump-skeys: 277# 278# Dump guest's storage keys 279# 280# @filename: the path to the file to dump to 281# 282# This command is only supported on s390 architecture. 283# 284# Since: 2.5 285# 286# Example: 287# 288# -> { "execute": "dump-skeys", 289# "arguments": { "filename": "/tmp/skeys" } } 290# <- { "return": {} } 291# 292## 293{ 'command': 'dump-skeys', 294 'data': { 'filename': 'str' }, 295 'if': 'TARGET_S390X' } 296 297## 298# @GICCapability: 299# 300# The struct describes capability for a specific GIC (Generic 301# Interrupt Controller) version. These bits are not only decided by 302# QEMU/KVM software version, but also decided by the hardware that 303# the program is running upon. 304# 305# @version: version of GIC to be described. Currently, only 2 and 3 306# are supported. 307# 308# @emulated: whether current QEMU/hardware supports emulated GIC 309# device in user space. 310# 311# @kernel: whether current QEMU/hardware supports hardware 312# accelerated GIC device in kernel. 313# 314# Since: 2.6 315## 316{ 'struct': 'GICCapability', 317 'data': { 'version': 'int', 318 'emulated': 'bool', 319 'kernel': 'bool' }, 320 'if': 'TARGET_ARM' } 321 322## 323# @query-gic-capabilities: 324# 325# This command is ARM-only. It will return a list of GICCapability 326# objects that describe its capability bits. 327# 328# Returns: a list of GICCapability objects. 329# 330# Since: 2.6 331# 332# Example: 333# 334# -> { "execute": "query-gic-capabilities" } 335# <- { "return": [{ "version": 2, "emulated": true, "kernel": false }, 336# { "version": 3, "emulated": false, "kernel": true } ] } 337# 338## 339{ 'command': 'query-gic-capabilities', 'returns': ['GICCapability'], 340 'if': 'TARGET_ARM' } 341 342 343## 344# @SevAttestationReport: 345# 346# The struct describes attestation report for a Secure Encrypted Virtualization 347# feature. 348# 349# @data: guest attestation report (base64 encoded) 350# 351# 352# Since: 6.1 353## 354{ 'struct': 'SevAttestationReport', 355 'data': { 'data': 'str'}, 356 'if': 'TARGET_I386' } 357 358## 359# @query-sev-attestation-report: 360# 361# This command is used to get the SEV attestation report, and is supported on AMD 362# X86 platforms only. 363# 364# @mnonce: a random 16 bytes value encoded in base64 (it will be included in report) 365# 366# Returns: SevAttestationReport objects. 367# 368# Since: 6.1 369# 370# Example: 371# 372# -> { "execute" : "query-sev-attestation-report", "arguments": { "mnonce": "aaaaaaa" } } 373# <- { "return" : { "data": "aaaaaaaabbbddddd"} } 374# 375## 376{ 'command': 'query-sev-attestation-report', 'data': { 'mnonce': 'str' }, 377 'returns': 'SevAttestationReport', 378 'if': 'TARGET_I386' } 379 380## 381# @SGXInfo: 382# 383# Information about intel Safe Guard eXtension (SGX) support 384# 385# @sgx: true if SGX is supported 386# 387# @sgx1: true if SGX1 is supported 388# 389# @sgx2: true if SGX2 is supported 390# 391# @flc: true if FLC is supported 392# 393# @section-size: The EPC section size for guest 394# 395# Since: 6.2 396## 397{ 'struct': 'SGXInfo', 398 'data': { 'sgx': 'bool', 399 'sgx1': 'bool', 400 'sgx2': 'bool', 401 'flc': 'bool', 402 'section-size': 'uint64'}, 403 'if': 'TARGET_I386' } 404 405## 406# @query-sgx: 407# 408# Returns information about SGX 409# 410# Returns: @SGXInfo 411# 412# Since: 6.2 413# 414# Example: 415# 416# -> { "execute": "query-sgx" } 417# <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : true, 418# "flc": true, "section-size" : 0 } } 419# 420## 421{ 'command': 'query-sgx', 'returns': 'SGXInfo', 'if': 'TARGET_I386' } 422 423## 424# @query-sgx-capabilities: 425# 426# Returns information from host SGX capabilities 427# 428# Returns: @SGXInfo 429# 430# Since: 6.2 431# 432# Example: 433# 434# -> { "execute": "query-sgx-capabilities" } 435# <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : true, 436# "flc": true, "section-size" : 0 } } 437# 438## 439{ 'command': 'query-sgx-capabilities', 'returns': 'SGXInfo', 'if': 'TARGET_I386' }