Commit e71c246816 for qemu.org

commit e71c246816ebb43a0994b472155d99e0bd472927
Author: Markus Armbruster <armbru@redhat.com>
Date:   Tue Nov 24 16:43:10 2026 +0100

    qom: Really add 'confidential-guest-reset' feature

    Commit a9b328611143 added feature 'confidential-guest-reset' to
    SevCommonProperties and to TdxGuestProperties.  The commit message
    states the intent as "control plane should be able to detect if the
    hypervisor supports x86 confidential guest resets."

    Management applications ("control plane") would check whether the
    relevant argument type of QMP command object-add has the feature.  The
    relevant types are SevGuestProperties, SevSnpGuestProperties, and
    TdxGuestProperties.

    Only TdxGuestProperties has the feature.  The other two have base type
    SevCommonProperties, but a type only inherits its base's members, and
    not its features or conditions.

    Fix by moving the feature from SevCommonProperties to
    SevGuestProperties and SevSnpGuestProperties.

    Fixes: a9b328611143 ("qom: add 'confidential-guest-reset' property for x86 confidential vms")
    Signed-off-by: Markus Armbruster <armbru@redhat.com>
    Message-ID: <20261124154310.2569390-2-armbru@redhat.com>
    Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
    Acked-by: Ani Sinha <anisinha@redhat.com>

diff --git a/qapi/qom.json b/qapi/qom.json
index 32a5926936..b8237a94be 100644
--- a/qapi/qom.json
+++ b/qapi/qom.json
@@ -1004,11 +1004,6 @@
 #     only supported on SEV-ES and SEV-SNP guests
 #     (default: false) (since 11.1)
 #
-# Features:
-#
-# @confidential-guest-reset: If present, the hypervisor supports
-#     confidential guest resets (since 11.0).
-#
 # Since: 9.1
 ##
 { 'struct': 'SevCommonProperties',
@@ -1016,8 +1011,7 @@
             '*cbitpos': 'uint32',
             'reduced-phys-bits': 'uint32',
             '*kernel-hashes': 'bool',
-            '*debug-swap': 'bool' },
-  'features': ['confidential-guest-reset']}
+            '*debug-swap': 'bool' } }

 ##
 # @SevGuestProperties:
@@ -1042,6 +1036,11 @@
 #    that require it.  If set to 'off', QEMU will require
 #    KVM_SEV_INIT2 unconditionally.  (default: off) (since 9.1)
 #
+# Features:
+#
+# @confidential-guest-reset: If present, the hypervisor supports
+#     confidential guest resets (since 11.0).
+#
 # Since: 2.12
 ##
 { 'struct': 'SevGuestProperties',
@@ -1050,7 +1049,8 @@
             '*session-file': 'str',
             '*policy': 'uint32',
             '*handle': 'uint32',
-            '*legacy-vm-type': 'OnOffAuto' } }
+            '*legacy-vm-type': 'OnOffAuto' },
+  'features': [ 'confidential-guest-reset' ] }

 ##
 # @SevSnpGuestProperties:
@@ -1101,6 +1101,11 @@
 # @tsc-frequency: set secure TSC frequency.  Only valid if Secure TSC
 #     is enabled (default: zero) (since 11.1)
 #
+# Features:
+#
+# @confidential-guest-reset: If present, the hypervisor supports
+#     confidential guest resets (since 11.0).
+#
 # Since: 9.1
 ##
 { 'struct': 'SevSnpGuestProperties',
@@ -1114,7 +1119,8 @@
             '*host-data': 'str',
             '*vcek-disabled': 'bool',
             '*secure-tsc': 'bool',
-            '*tsc-frequency': 'uint32' } }
+            '*tsc-frequency': 'uint32' },
+  'features': [ 'confidential-guest-reset' ] }

 ##
 # @TdxGuestProperties: