From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: stefanha@redhat.com, "Daniel P. Berrangé" <berrange@redhat.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Pierrick Bouvier" <pierrick.bouvier@linaro.org>
Subject: [PULL 02/13] qapi: expand docs for SEV commands
Date: Wed, 28 May 2025 20:31:40 +0200 [thread overview]
Message-ID: <20250528183151.2839034-3-armbru@redhat.com> (raw)
In-Reply-To: <20250528183151.2839034-1-armbru@redhat.com>
From: Daniel P. Berrangé <berrange@redhat.com>
This gives some more context about the behaviour of the commands in
unsupported guest configuration or platform scenarios.
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-3-pierrick.bouvier@linaro.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Tweak query-sev doc, turn error descriptions into Errors sections,
delate a stray #, normalize whitespace, wrap lines]
---
qapi/misc-target.json | 50 +++++++++++++++++++++++++++++++++++++------
1 file changed, 43 insertions(+), 7 deletions(-)
diff --git a/qapi/misc-target.json b/qapi/misc-target.json
index c5f9f6be7e..e19a12e88a 100644
--- a/qapi/misc-target.json
+++ b/qapi/misc-target.json
@@ -110,7 +110,11 @@
##
# @query-sev:
#
-# Returns information about SEV
+# Returns information about SEV/SEV-ES/SEV-SNP.
+#
+# If unavailable due to an incompatible configuration the returned
+# @enabled field is set to 'false' and the state of all other fields
+# is unspecified.
#
# Returns: @SevInfo
#
@@ -141,10 +145,19 @@
##
# @query-sev-launch-measure:
#
-# Query the SEV guest launch information.
+# Query the SEV/SEV-ES guest launch information.
+#
+# This is only valid on x86 machines configured with KVM and the
+# 'sev-guest' confidential virtualization object. The launch
+# measurement for SEV-SNP guests is only available within the guest.
#
# Returns: The @SevLaunchMeasureInfo for the guest
#
+# Errors:
+# - If the launch measurement is unavailable, either due to an
+# invalid guest configuration or if the guest has not reached
+# the required SEV state, GenericError
+#
# Since: 2.12
#
# .. qmp-example::
@@ -185,11 +198,15 @@
##
# @query-sev-capabilities:
#
-# This command is used to get the SEV capabilities, and is supported
-# on AMD X86 platforms only.
+# Get SEV capabilities.
+#
+# This is only supported on AMD X86 platforms with KVM enabled.
#
# Returns: SevCapability objects.
#
+# Errors:
+# - If SEV is not available on the platform, GenericError
+#
# Since: 2.12
#
# .. qmp-example::
@@ -205,7 +222,12 @@
##
# @sev-inject-launch-secret:
#
-# This command injects a secret blob into memory of SEV guest.
+# This command injects a secret blob into memory of a SEV/SEV-ES
+# guest.
+#
+# This is only valid on x86 machines configured with KVM and the
+# 'sev-guest' confidential virtualization object. SEV-SNP guests do
+# not support launch secret injection.
#
# @packet-header: the launch secret packet header encoded in base64
#
@@ -213,6 +235,11 @@
#
# @gpa: the guest physical address where secret will be injected.
#
+# Errors:
+# - If launch secret injection is not possible, either due to
+# an invalid guest configuration, or if the guest has not
+# reached the required SEV state, GenericError
+#
# Since: 6.0
##
{ 'command': 'sev-inject-launch-secret',
@@ -236,14 +263,23 @@
##
# @query-sev-attestation-report:
#
-# This command is used to get the SEV attestation report, and is
-# supported on AMD X86 platforms only.
+# This command is used to get the SEV attestation report.
+#
+# This is only valid on x86 machines configured with KVM and the
+# 'sev-guest' confidential virtualization object. The attestation
+# report for SEV-SNP guests is only available within the guest.
#
# @mnonce: a random 16 bytes value encoded in base64 (it will be
# included in report)
#
# Returns: SevAttestationReport objects.
#
+# Errors:
+# - This will return an error if the attestation report is
+# unavailable, either due to an invalid guest configuration
+# or if the guest has not reached the required SEV state,
+# GenericError
+#
# Since: 6.1
#
# .. qmp-example::
--
2.48.1
next prev parent reply other threads:[~2025-05-28 18:33 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-28 18:31 [PULL 00/13] QAPI patches patches for 2025-05-28 Markus Armbruster
2025-05-28 18:31 ` [PULL 01/13] qapi: expose rtc-reset-reinjection command unconditionally Markus Armbruster
2025-05-28 18:31 ` Markus Armbruster [this message]
2025-05-28 18:31 ` [PULL 03/13] qapi: make SEV commands unconditionally available Markus Armbruster
2025-05-28 18:31 ` [PULL 04/13] qapi: expose query-gic-capability command unconditionally Markus Armbruster
2025-05-28 18:31 ` [PULL 05/13] qapi: make SGX commands unconditionally available Markus Armbruster
2025-05-28 18:31 ` [PULL 06/13] qapi: make Xen event " Markus Armbruster
2025-05-28 18:31 ` [PULL 07/13] qapi: remove the misc-target.json file Markus Armbruster
2025-05-28 18:31 ` [PULL 08/13] qapi: Make CpuModelExpansionInfo::deprecated-props optional and generic Markus Armbruster
2025-05-28 18:31 ` [PULL 09/13] qapi: make most CPU commands unconditionally available Markus Armbruster
2025-05-28 18:31 ` [PULL 10/13] qapi: make s390x specific " Markus Armbruster
2025-05-28 18:31 ` [PULL 11/13] qapi: remove qapi_specific_outputs from meson.build Markus Armbruster
2025-05-28 18:31 ` [PULL 12/13] qapi: make all generated files common Markus Armbruster
2025-05-28 18:31 ` [PULL 13/13] qapi: use imperative style in documentation Markus Armbruster
2025-05-29 14:56 ` [PULL 00/13] QAPI patches patches for 2025-05-28 Stefan Hajnoczi
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=20250528183151.2839034-3-armbru@redhat.com \
--to=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=pierrick.bouvier@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=stefanha@redhat.com \
/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).