diff mbox series

[v4,15/15] qapi/misc-i386: move errors to their own documentation section

Message ID 20250522190542.588267-16-pierrick.bouvier@linaro.org
State New
Headers show
Series qapi: remove all TARGET_* conditionals from the schema | expand

Commit Message

Pierrick Bouvier May 22, 2025, 7:05 p.m. UTC
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
---
 qapi/misc-i386.json | 39 +++++++++++++++++++++++----------------
 1 file changed, 23 insertions(+), 16 deletions(-)

Comments

Markus Armbruster May 27, 2025, 11:20 a.m. UTC | #1
Pierrick Bouvier <pierrick.bouvier@linaro.org> writes:

> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>

My comment on the previous patch applies.
Markus Armbruster May 27, 2025, 12:57 p.m. UTC | #2
Pierrick Bouvier <pierrick.bouvier@linaro.org> writes:

> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> ---
>  qapi/misc-i386.json | 39 +++++++++++++++++++++++----------------
>  1 file changed, 23 insertions(+), 16 deletions(-)
>
> diff --git a/qapi/misc-i386.json b/qapi/misc-i386.json
> index 6f79817e382..796eaa5f406 100644
> --- a/qapi/misc-i386.json
> +++ b/qapi/misc-i386.json
> @@ -166,12 +166,13 @@
>  # measurement for SEV-SNP guests is only available within
>  # the guest.
>  #
> -# This will return an error if the launch measurement is
> -# unavailable, either due to an invalid guest configuration
> -# or if the guest has not reached the required SEV state.
> -#
>  # 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::
> @@ -210,12 +211,15 @@
>  ##
>  # @query-sev-capabilities:
>  #
> -# This command is used to get the SEV capabilities, and is only
> -# supported on AMD X86 platforms with KVM enabled. If SEV is not
> -# available on the platform an error will be returned.
> +# 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

Stray #

> +#
>  # Since: 2.12
>  #
>  # .. qmp-example::
> @@ -234,11 +238,7 @@
>  #
>  # 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
> -#
> -# This will return an error 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.
> +# do not support launch secret injection.
>  #
>  # @packet-header: the launch secret packet header encoded in base64
>  #
> @@ -246,6 +246,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',
> @@ -273,15 +278,17 @@
>  # 'sev-guest' confidential virtualization object. The attestation
>  # report for SEV-SNP guests is only available within the guest.
>  #
> -# 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.
> -#
>  # @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

Scratch "This will return an error"

> +#       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::
Pierrick Bouvier May 27, 2025, 4:58 p.m. UTC | #3
On 5/27/25 4:20 AM, Markus Armbruster wrote:
> Pierrick Bouvier <pierrick.bouvier@linaro.org> writes:
> 
>> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> 
> My comment on the previous patch applies.
> 

I'm not sure to which comment exactly you refer to.
Markus Armbruster May 28, 2025, 4:59 a.m. UTC | #4
Pierrick Bouvier <pierrick.bouvier@linaro.org> writes:

> On 5/27/25 4:20 AM, Markus Armbruster wrote:
>> Pierrick Bouvier <pierrick.bouvier@linaro.org> writes:
>> 
>>> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
>>
>> My comment on the previous patch applies.
>> 
>
> I'm not sure to which comment exactly you refer to.

Should've been explicit :)

I'd squash this into PATCH 02.  I figure you didn't because PATCH 02 is
Daniel's.  Here's how I would record provenance when squashing:

    Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
    Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
    [Error documentation tidied up]
    Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>

If you want to record why, you could add "at Markus's request".
Pierrick Bouvier May 28, 2025, 7 p.m. UTC | #5
On 5/27/25 9:59 PM, Markus Armbruster wrote:
> Pierrick Bouvier <pierrick.bouvier@linaro.org> writes:
> 
>> On 5/27/25 4:20 AM, Markus Armbruster wrote:
>>> Pierrick Bouvier <pierrick.bouvier@linaro.org> writes:
>>>
>>>> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
>>>
>>> My comment on the previous patch applies.
>>>
>>
>> I'm not sure to which comment exactly you refer to.
> 
> Should've been explicit :)
> 
> I'd squash this into PATCH 02.  I figure you didn't because PATCH 02 is
> Daniel's.  Here's how I would record provenance when squashing:
> 
>      Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>      Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
>      [Error documentation tidied up]
>      Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> 
> If you want to record why, you could add "at Markus's request".
> 

I see better.
Feel free to squash it, I keep this splitted to avoid rebase self 
conflicts, and to facilitate review.
diff mbox series

Patch

diff --git a/qapi/misc-i386.json b/qapi/misc-i386.json
index 6f79817e382..796eaa5f406 100644
--- a/qapi/misc-i386.json
+++ b/qapi/misc-i386.json
@@ -166,12 +166,13 @@ 
 # measurement for SEV-SNP guests is only available within
 # the guest.
 #
-# This will return an error if the launch measurement is
-# unavailable, either due to an invalid guest configuration
-# or if the guest has not reached the required SEV state.
-#
 # 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::
@@ -210,12 +211,15 @@ 
 ##
 # @query-sev-capabilities:
 #
-# This command is used to get the SEV capabilities, and is only
-# supported on AMD X86 platforms with KVM enabled. If SEV is not
-# available on the platform an error will be returned.
+# 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::
@@ -234,11 +238,7 @@ 
 #
 # 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
-#
-# This will return an error 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.
+# do not support launch secret injection.
 #
 # @packet-header: the launch secret packet header encoded in base64
 #
@@ -246,6 +246,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',
@@ -273,15 +278,17 @@ 
 # 'sev-guest' confidential virtualization object. The attestation
 # report for SEV-SNP guests is only available within the guest.
 #
-# 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.
-#
 # @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::