Skip to content

Commit 5e8ef1d

Browse files
trueptolemyMichael Tokarev
authored andcommitted
qapi/misc-target: Fix the doc to distinguish query-sgx and query-sgx-capabilities
There're 2 QMP commands: query-sgx and query-sgx-capabilities, but their outputs are very similar and the documentation lacks clear differentiation. From the codes, query-sgx is used to gather guest's SGX capabilities (including SGX related CPUIDs and EPC sections' size, in SGXInfo), and if guest doesn't have SGX, then QEMU will report the error message. On the other hand, query-sgx-capabilities is used to gather host's SGX capabilities (descripted by SGXInfo as well). And if host doesn't support SGX, then QEMU will also report the error message. Considering that SGXInfo is already documented and both these 2 commands have enough error messages (for the exception case in their codes). Therefore the QAPI documentation for these two commands only needs to emphasize that one of them applies to the guest and the other to the host. Fix their documentation to reflect this difference. Reported-by: Markus Armbruster <[email protected]> Suggested-by: Paolo Bonzini <[email protected]> Signed-off-by: Zhao Liu <[email protected]> Acked-by: Markus Armbruster <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Bonzini <[email protected]> (cherry picked from commit 7f2131c) Signed-off-by: Michael Tokarev <[email protected]>
1 parent ef16559 commit 5e8ef1d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

qapi/misc-target.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@
380380
##
381381
# @query-sgx:
382382
#
383-
# Returns information about SGX
383+
# Returns information about configured SGX capabilities of guest
384384
#
385385
# Returns: @SGXInfo
386386
#
@@ -399,7 +399,7 @@
399399
##
400400
# @query-sgx-capabilities:
401401
#
402-
# Returns information from host SGX capabilities
402+
# Returns information about SGX capabilities of host
403403
#
404404
# Returns: @SGXInfo
405405
#

0 commit comments

Comments
 (0)