From: Zhao Liu <zhao1.liu@intel.com>
To: Markus Armbruster <armbru@redhat.com>,
Eric Blake <eblake@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, Zhao Liu <zhao1.liu@intel.com>
Subject: [PATCH 2/2] qapi/misc-target: Fix the doc to distinguish query-sgx and query-sgx-capabilities
Date: Tue, 13 May 2025 22:31:31 +0800 [thread overview]
Message-ID: <20250513143131.2008078-3-zhao1.liu@intel.com> (raw)
In-Reply-To: <20250513143131.2008078-1-zhao1.liu@intel.com>
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 <armbru@redhat.com>
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
---
qapi/misc-target.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/qapi/misc-target.json b/qapi/misc-target.json
index ed5b7db1bd2a..903863e8d0c2 100644
--- a/qapi/misc-target.json
+++ b/qapi/misc-target.json
@@ -361,7 +361,7 @@
##
# @query-sgx:
#
-# Returns information about SGX
+# Returns information about configured SGX capabilities of guest
#
# Returns: @SGXInfo
#
@@ -380,7 +380,7 @@
##
# @query-sgx-capabilities:
#
-# Returns information from host SGX capabilities
+# Returns information about SGX capabilities of host
#
# Returns: @SGXInfo
#
--
2.34.1
next prev parent reply other threads:[~2025-05-13 14:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-13 14:31 [PATCH 0/2] qapi/misc-target: Fix the doc of query-sgx and query-sgx-capabilities Zhao Liu
2025-05-13 14:31 ` [PATCH 1/2] qapi/misc-target: Fix the doc related SGXEPCSection Zhao Liu
2025-05-13 14:31 ` Zhao Liu [this message]
2025-05-15 6:07 ` [PATCH 0/2] qapi/misc-target: Fix the doc of query-sgx and query-sgx-capabilities Markus Armbruster
2025-05-15 6:56 ` Zhao Liu
2025-05-15 7:43 ` Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250513143131.2008078-3-zhao1.liu@intel.com \
--to=zhao1.liu@intel.com \
--cc=armbru@redhat.com \
--cc=eblake@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).