mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
qapi: make SGX commands unconditionally available
This removes the TARGET_I386 condition from the SGX confidential virtualization commands, moving them to the recently introduced misc-i386.json QAPI file, given they are inherantly i386 specific commands. Observe a pre-existing bug that the "SGXEPCSection" struct lacked a TARGET_I386 condition, despite its only usage being behind a TARGET_I386 condition. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-ID: <20250522190542.588267-6-pierrick.bouvier@linaro.org> Reviewed-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
committed by
Markus Armbruster
parent
30fbb25871
commit
28a6a99834
@@ -300,3 +300,80 @@
|
||||
{ 'command': 'query-sev-attestation-report',
|
||||
'data': { 'mnonce': 'str' },
|
||||
'returns': 'SevAttestationReport' }
|
||||
|
||||
##
|
||||
# @SgxEpcSection:
|
||||
#
|
||||
# Information about intel SGX EPC section
|
||||
#
|
||||
# @node: the numa node
|
||||
#
|
||||
# @size: the size of EPC section
|
||||
#
|
||||
# Since: 7.0
|
||||
##
|
||||
{ 'struct': 'SgxEpcSection',
|
||||
'data': { 'node': 'int',
|
||||
'size': 'uint64'}}
|
||||
|
||||
##
|
||||
# @SgxInfo:
|
||||
#
|
||||
# Information about intel Safe Guard eXtension (SGX) support
|
||||
#
|
||||
# @sgx: true if SGX is supported
|
||||
#
|
||||
# @sgx1: true if SGX1 is supported
|
||||
#
|
||||
# @sgx2: true if SGX2 is supported
|
||||
#
|
||||
# @flc: true if FLC is supported
|
||||
#
|
||||
# @sections: The EPC sections information (Since: 7.0)
|
||||
#
|
||||
# Since: 6.2
|
||||
##
|
||||
{ 'struct': 'SgxInfo',
|
||||
'data': { 'sgx': 'bool',
|
||||
'sgx1': 'bool',
|
||||
'sgx2': 'bool',
|
||||
'flc': 'bool',
|
||||
'sections': ['SgxEpcSection']} }
|
||||
|
||||
##
|
||||
# @query-sgx:
|
||||
#
|
||||
# Returns information about configured SGX capabilities of guest
|
||||
#
|
||||
# Returns: @SgxInfo
|
||||
#
|
||||
# Since: 6.2
|
||||
#
|
||||
# .. qmp-example::
|
||||
#
|
||||
# -> { "execute": "query-sgx" }
|
||||
# <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : true,
|
||||
# "flc": true,
|
||||
# "sections": [{"node": 0, "size": 67108864},
|
||||
# {"node": 1, "size": 29360128}]} }
|
||||
##
|
||||
{ 'command': 'query-sgx', 'returns': 'SgxInfo' }
|
||||
|
||||
##
|
||||
# @query-sgx-capabilities:
|
||||
#
|
||||
# Returns information about SGX capabilities of host
|
||||
#
|
||||
# Returns: @SgxInfo
|
||||
#
|
||||
# Since: 6.2
|
||||
#
|
||||
# .. qmp-example::
|
||||
#
|
||||
# -> { "execute": "query-sgx-capabilities" }
|
||||
# <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : true,
|
||||
# "flc": true,
|
||||
# "section" : [{"node": 0, "size": 67108864},
|
||||
# {"node": 1, "size": 29360128}]} }
|
||||
##
|
||||
{ 'command': 'query-sgx-capabilities', 'returns': 'SgxInfo' }
|
||||
|
||||
@@ -2,85 +2,6 @@
|
||||
# vim: filetype=python
|
||||
#
|
||||
|
||||
##
|
||||
# @SgxEpcSection:
|
||||
#
|
||||
# Information about intel SGX EPC section
|
||||
#
|
||||
# @node: the numa node
|
||||
#
|
||||
# @size: the size of EPC section
|
||||
#
|
||||
# Since: 7.0
|
||||
##
|
||||
{ 'struct': 'SgxEpcSection',
|
||||
'data': { 'node': 'int',
|
||||
'size': 'uint64'}}
|
||||
|
||||
##
|
||||
# @SgxInfo:
|
||||
#
|
||||
# Information about intel Safe Guard eXtension (SGX) support
|
||||
#
|
||||
# @sgx: true if SGX is supported
|
||||
#
|
||||
# @sgx1: true if SGX1 is supported
|
||||
#
|
||||
# @sgx2: true if SGX2 is supported
|
||||
#
|
||||
# @flc: true if FLC is supported
|
||||
#
|
||||
# @sections: The EPC sections information (Since: 7.0)
|
||||
#
|
||||
# Since: 6.2
|
||||
##
|
||||
{ 'struct': 'SgxInfo',
|
||||
'data': { 'sgx': 'bool',
|
||||
'sgx1': 'bool',
|
||||
'sgx2': 'bool',
|
||||
'flc': 'bool',
|
||||
'sections': ['SgxEpcSection']},
|
||||
'if': 'TARGET_I386' }
|
||||
|
||||
##
|
||||
# @query-sgx:
|
||||
#
|
||||
# Returns information about configured SGX capabilities of guest
|
||||
#
|
||||
# Returns: @SgxInfo
|
||||
#
|
||||
# Since: 6.2
|
||||
#
|
||||
# .. qmp-example::
|
||||
#
|
||||
# -> { "execute": "query-sgx" }
|
||||
# <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : true,
|
||||
# "flc": true,
|
||||
# "sections": [{"node": 0, "size": 67108864},
|
||||
# {"node": 1, "size": 29360128}]} }
|
||||
##
|
||||
{ 'command': 'query-sgx', 'returns': 'SgxInfo', 'if': 'TARGET_I386' }
|
||||
|
||||
##
|
||||
# @query-sgx-capabilities:
|
||||
#
|
||||
# Returns information about SGX capabilities of host
|
||||
#
|
||||
# Returns: @SgxInfo
|
||||
#
|
||||
# Since: 6.2
|
||||
#
|
||||
# .. qmp-example::
|
||||
#
|
||||
# -> { "execute": "query-sgx-capabilities" }
|
||||
# <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : true,
|
||||
# "flc": true,
|
||||
# "section" : [{"node": 0, "size": 67108864},
|
||||
# {"node": 1, "size": 29360128}]} }
|
||||
##
|
||||
{ 'command': 'query-sgx-capabilities', 'returns': 'SgxInfo', 'if': 'TARGET_I386' }
|
||||
|
||||
|
||||
##
|
||||
# @EvtchnPortType:
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user