0e2f4530c1
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Cornelia Huck <cohuck@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190214152251.2073-11-armbru@redhat.com>
325 lines
9.1 KiB
Python
325 lines
9.1 KiB
Python
# -*- Mode: Python -*-
|
|
#
|
|
|
|
##
|
|
# = Target-specific commands & events
|
|
##
|
|
|
|
{ 'include': 'misc.json' }
|
|
|
|
##
|
|
# @rtc-reset-reinjection:
|
|
#
|
|
# This command will reset the RTC interrupt reinjection backlog.
|
|
# Can be used if another mechanism to synchronize guest time
|
|
# is in effect, for example QEMU guest agent's guest-set-time
|
|
# command.
|
|
#
|
|
# Since: 2.1
|
|
#
|
|
# Example:
|
|
#
|
|
# -> { "execute": "rtc-reset-reinjection" }
|
|
# <- { "return": {} }
|
|
#
|
|
##
|
|
{ 'command': 'rtc-reset-reinjection',
|
|
'if': 'defined(TARGET_I386)' }
|
|
|
|
|
|
##
|
|
# @SevState:
|
|
#
|
|
# An enumeration of SEV state information used during @query-sev.
|
|
#
|
|
# @uninit: The guest is uninitialized.
|
|
#
|
|
# @launch-update: The guest is currently being launched; plaintext data and
|
|
# register state is being imported.
|
|
#
|
|
# @launch-secret: The guest is currently being launched; ciphertext data
|
|
# is being imported.
|
|
#
|
|
# @running: The guest is fully launched or migrated in.
|
|
#
|
|
# @send-update: The guest is currently being migrated out to another machine.
|
|
#
|
|
# @receive-update: The guest is currently being migrated from another machine.
|
|
#
|
|
# Since: 2.12
|
|
##
|
|
{ 'enum': 'SevState',
|
|
'data': ['uninit', 'launch-update', 'launch-secret', 'running',
|
|
'send-update', 'receive-update' ],
|
|
'if': 'defined(TARGET_I386)' }
|
|
|
|
##
|
|
# @SevInfo:
|
|
#
|
|
# Information about Secure Encrypted Virtualization (SEV) support
|
|
#
|
|
# @enabled: true if SEV is active
|
|
#
|
|
# @api-major: SEV API major version
|
|
#
|
|
# @api-minor: SEV API minor version
|
|
#
|
|
# @build-id: SEV FW build id
|
|
#
|
|
# @policy: SEV policy value
|
|
#
|
|
# @state: SEV guest state
|
|
#
|
|
# @handle: SEV firmware handle
|
|
#
|
|
# Since: 2.12
|
|
##
|
|
{ 'struct': 'SevInfo',
|
|
'data': { 'enabled': 'bool',
|
|
'api-major': 'uint8',
|
|
'api-minor' : 'uint8',
|
|
'build-id' : 'uint8',
|
|
'policy' : 'uint32',
|
|
'state' : 'SevState',
|
|
'handle' : 'uint32'
|
|
},
|
|
'if': 'defined(TARGET_I386)'
|
|
}
|
|
|
|
##
|
|
# @query-sev:
|
|
#
|
|
# Returns information about SEV
|
|
#
|
|
# Returns: @SevInfo
|
|
#
|
|
# Since: 2.12
|
|
#
|
|
# Example:
|
|
#
|
|
# -> { "execute": "query-sev" }
|
|
# <- { "return": { "enabled": true, "api-major" : 0, "api-minor" : 0,
|
|
# "build-id" : 0, "policy" : 0, "state" : "running",
|
|
# "handle" : 1 } }
|
|
#
|
|
##
|
|
{ 'command': 'query-sev', 'returns': 'SevInfo',
|
|
'if': 'defined(TARGET_I386)' }
|
|
|
|
|
|
##
|
|
# @SevLaunchMeasureInfo:
|
|
#
|
|
# SEV Guest Launch measurement information
|
|
#
|
|
# @data: the measurement value encoded in base64
|
|
#
|
|
# Since: 2.12
|
|
#
|
|
##
|
|
{ 'struct': 'SevLaunchMeasureInfo', 'data': {'data': 'str'},
|
|
'if': 'defined(TARGET_I386)' }
|
|
|
|
##
|
|
# @query-sev-launch-measure:
|
|
#
|
|
# Query the SEV guest launch information.
|
|
#
|
|
# Returns: The @SevLaunchMeasureInfo for the guest
|
|
#
|
|
# Since: 2.12
|
|
#
|
|
# Example:
|
|
#
|
|
# -> { "execute": "query-sev-launch-measure" }
|
|
# <- { "return": { "data": "4l8LXeNlSPUDlXPJG5966/8%YZ" } }
|
|
#
|
|
##
|
|
{ 'command': 'query-sev-launch-measure', 'returns': 'SevLaunchMeasureInfo',
|
|
'if': 'defined(TARGET_I386)' }
|
|
|
|
|
|
##
|
|
# @SevCapability:
|
|
#
|
|
# The struct describes capability for a Secure Encrypted Virtualization
|
|
# feature.
|
|
#
|
|
# @pdh: Platform Diffie-Hellman key (base64 encoded)
|
|
#
|
|
# @cert-chain: PDH certificate chain (base64 encoded)
|
|
#
|
|
# @cbitpos: C-bit location in page table entry
|
|
#
|
|
# @reduced-phys-bits: Number of physical Address bit reduction when SEV is
|
|
# enabled
|
|
#
|
|
# Since: 2.12
|
|
##
|
|
{ 'struct': 'SevCapability',
|
|
'data': { 'pdh': 'str',
|
|
'cert-chain': 'str',
|
|
'cbitpos': 'int',
|
|
'reduced-phys-bits': 'int'},
|
|
'if': 'defined(TARGET_I386)' }
|
|
|
|
##
|
|
# @query-sev-capabilities:
|
|
#
|
|
# This command is used to get the SEV capabilities, and is supported on AMD
|
|
# X86 platforms only.
|
|
#
|
|
# Returns: SevCapability objects.
|
|
#
|
|
# Since: 2.12
|
|
#
|
|
# Example:
|
|
#
|
|
# -> { "execute": "query-sev-capabilities" }
|
|
# <- { "return": { "pdh": "8CCDD8DDD", "cert-chain": "888CCCDDDEE",
|
|
# "cbitpos": 47, "reduced-phys-bits": 5}}
|
|
#
|
|
##
|
|
{ 'command': 'query-sev-capabilities', 'returns': 'SevCapability',
|
|
'if': 'defined(TARGET_I386)' }
|
|
|
|
##
|
|
# @dump-skeys:
|
|
#
|
|
# Dump guest's storage keys
|
|
#
|
|
# @filename: the path to the file to dump to
|
|
#
|
|
# This command is only supported on s390 architecture.
|
|
#
|
|
# Since: 2.5
|
|
#
|
|
# Example:
|
|
#
|
|
# -> { "execute": "dump-skeys",
|
|
# "arguments": { "filename": "/tmp/skeys" } }
|
|
# <- { "return": {} }
|
|
#
|
|
##
|
|
{ 'command': 'dump-skeys',
|
|
'data': { 'filename': 'str' },
|
|
'if': 'defined(TARGET_S390X)' }
|
|
|
|
##
|
|
# @CpuModelBaselineInfo:
|
|
#
|
|
# The result of a CPU model baseline.
|
|
#
|
|
# @model: the baselined CpuModelInfo.
|
|
#
|
|
# Since: 2.8.0
|
|
##
|
|
{ 'struct': 'CpuModelBaselineInfo',
|
|
'data': { 'model': 'CpuModelInfo' },
|
|
'if': 'defined(TARGET_S390X)' }
|
|
|
|
##
|
|
# @CpuModelCompareInfo:
|
|
#
|
|
# The result of a CPU model comparison.
|
|
#
|
|
# @result: The result of the compare operation.
|
|
# @responsible-properties: List of properties that led to the comparison result
|
|
# not being identical.
|
|
#
|
|
# @responsible-properties is a list of QOM property names that led to
|
|
# both CPUs not being detected as identical. For identical models, this
|
|
# list is empty.
|
|
# If a QOM property is read-only, that means there's no known way to make the
|
|
# CPU models identical. If the special property name "type" is included, the
|
|
# models are by definition not identical and cannot be made identical.
|
|
#
|
|
# Since: 2.8.0
|
|
##
|
|
{ 'struct': 'CpuModelCompareInfo',
|
|
'data': { 'result': 'CpuModelCompareResult',
|
|
'responsible-properties': ['str'] },
|
|
'if': 'defined(TARGET_S390X)' }
|
|
|
|
##
|
|
# @query-cpu-model-comparison:
|
|
#
|
|
# Compares two CPU models, returning how they compare in a specific
|
|
# configuration. The results indicates how both models compare regarding
|
|
# runnability. This result can be used by tooling to make decisions if a
|
|
# certain CPU model will run in a certain configuration or if a compatible
|
|
# CPU model has to be created by baselining.
|
|
#
|
|
# Usually, a CPU model is compared against the maximum possible CPU model
|
|
# of a certain configuration (e.g. the "host" model for KVM). If that CPU
|
|
# model is identical or a subset, it will run in that configuration.
|
|
#
|
|
# The result returned by this command may be affected by:
|
|
#
|
|
# * QEMU version: CPU models may look different depending on the QEMU version.
|
|
# (Except for CPU models reported as "static" in query-cpu-definitions.)
|
|
# * machine-type: CPU model may look different depending on the machine-type.
|
|
# (Except for CPU models reported as "static" in query-cpu-definitions.)
|
|
# * machine options (including accelerator): in some architectures, CPU models
|
|
# may look different depending on machine and accelerator options. (Except for
|
|
# CPU models reported as "static" in query-cpu-definitions.)
|
|
# * "-cpu" arguments and global properties: arguments to the -cpu option and
|
|
# global properties may affect expansion of CPU models. Using
|
|
# query-cpu-model-expansion while using these is not advised.
|
|
#
|
|
# Some architectures may not support comparing CPU models. s390x supports
|
|
# comparing CPU models.
|
|
#
|
|
# Returns: a CpuModelBaselineInfo. Returns an error if comparing CPU models is
|
|
# not supported, if a model cannot be used, if a model contains
|
|
# an unknown cpu definition name, unknown properties or properties
|
|
# with wrong types.
|
|
#
|
|
# Since: 2.8.0
|
|
##
|
|
{ 'command': 'query-cpu-model-comparison',
|
|
'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' },
|
|
'returns': 'CpuModelCompareInfo',
|
|
'if': 'defined(TARGET_S390X)' }
|
|
|
|
##
|
|
# @query-cpu-model-baseline:
|
|
#
|
|
# Baseline two CPU models, creating a compatible third model. The created
|
|
# model will always be a static, migration-safe CPU model (see "static"
|
|
# CPU model expansion for details).
|
|
#
|
|
# This interface can be used by tooling to create a compatible CPU model out
|
|
# two CPU models. The created CPU model will be identical to or a subset of
|
|
# both CPU models when comparing them. Therefore, the created CPU model is
|
|
# guaranteed to run where the given CPU models run.
|
|
#
|
|
# The result returned by this command may be affected by:
|
|
#
|
|
# * QEMU version: CPU models may look different depending on the QEMU version.
|
|
# (Except for CPU models reported as "static" in query-cpu-definitions.)
|
|
# * machine-type: CPU model may look different depending on the machine-type.
|
|
# (Except for CPU models reported as "static" in query-cpu-definitions.)
|
|
# * machine options (including accelerator): in some architectures, CPU models
|
|
# may look different depending on machine and accelerator options. (Except for
|
|
# CPU models reported as "static" in query-cpu-definitions.)
|
|
# * "-cpu" arguments and global properties: arguments to the -cpu option and
|
|
# global properties may affect expansion of CPU models. Using
|
|
# query-cpu-model-expansion while using these is not advised.
|
|
#
|
|
# Some architectures may not support baselining CPU models. s390x supports
|
|
# baselining CPU models.
|
|
#
|
|
# Returns: a CpuModelBaselineInfo. Returns an error if baselining CPU models is
|
|
# not supported, if a model cannot be used, if a model contains
|
|
# an unknown cpu definition name, unknown properties or properties
|
|
# with wrong types.
|
|
#
|
|
# Since: 2.8.0
|
|
##
|
|
{ 'command': 'query-cpu-model-baseline',
|
|
'data': { 'modela': 'CpuModelInfo',
|
|
'modelb': 'CpuModelInfo' },
|
|
'returns': 'CpuModelBaselineInfo',
|
|
'if': 'defined(TARGET_S390X)' }
|