diff --git a/docs/formatdomaincaps.rst b/docs/formatdomaincaps.rst
index 609a767189..a2ad0acc3d 100644
--- a/docs/formatdomaincaps.rst
+++ b/docs/formatdomaincaps.rst
@@ -798,3 +798,13 @@ are supported. The ``features`` enum corresponds to the ```` element
Please note that depending on the QEMU version some capabilities might be
missing even though QEMU does support them. This is because prior to QEMU-6.1.0
not all features were reported by QEMU.
+
+Launch security
+^^^^^^^^^^^^^^^
+
+The ``launchSecurity`` element exposes supported aspects of encrypted guests.
+The ``sectype`` enum corresponds to ``type`` attribute of ````
+element as documented in `Launch Security
+`__. :since:`(Since 10.5.0)` For additional
+information on individual types, see sections above: `s390-pv capability`_ for
+S390 PV, `SEV capabilities`_ for AMD SEV and/or AMD SEV-SNP.
diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c
index 68eb3c9797..3f2d231d1c 100644
--- a/src/conf/domain_capabilities.c
+++ b/src/conf/domain_capabilities.c
@@ -707,6 +707,19 @@ virDomainCapsFeatureHypervFormat(virBuffer *buf,
FORMAT_EPILOGUE(hyperv);
}
+
+static void
+virDomainCapsLaunchSecurityFormat(virBuffer *buf,
+ const virDomainCapsLaunchSecurity *launchSecurity)
+{
+ FORMAT_PROLOGUE(launchSecurity);
+
+ ENUM_PROCESS(launchSecurity, sectype, virDomainLaunchSecurityTypeToString);
+
+ FORMAT_EPILOGUE(launchSecurity);
+}
+
+
static void
virDomainCapsFormatFeatures(const virDomainCaps *caps,
virBuffer *buf)
@@ -728,6 +741,7 @@ virDomainCapsFormatFeatures(const virDomainCaps *caps,
virDomainCapsFeatureSEVFormat(&childBuf, caps->sev);
virDomainCapsFeatureSGXFormat(&childBuf, caps->sgx);
virDomainCapsFeatureHypervFormat(&childBuf, caps->hyperv);
+ virDomainCapsLaunchSecurityFormat(&childBuf, &caps->launchSecurity);
virXMLFormatElement(buf, "features", NULL, &childBuf);
}
diff --git a/src/conf/domain_capabilities.h b/src/conf/domain_capabilities.h
index fadc30cdd7..986f3cb394 100644
--- a/src/conf/domain_capabilities.h
+++ b/src/conf/domain_capabilities.h
@@ -165,6 +165,14 @@ struct _virDomainCapsFeatureHyperv {
virDomainCapsEnum features; /* Info about supported virDomainHyperv features */
};
+STATIC_ASSERT_ENUM(VIR_DOMAIN_LAUNCH_SECURITY_LAST);
+typedef struct _virDomainCapsLaunchSecurity virDomainCapsLaunchSecurity;
+struct _virDomainCapsLaunchSecurity {
+ virTristateBool supported;
+ virDomainCapsEnum sectype; /* Info about supported virDomainLaunchSecurity */
+};
+
+
typedef enum {
VIR_DOMCAPS_CPU_USABLE_UNKNOWN,
VIR_DOMCAPS_CPU_USABLE_YES,
@@ -284,6 +292,7 @@ struct _virDomainCaps {
virSEVCapability *sev;
virSGXCapability *sgx;
virDomainCapsFeatureHyperv *hyperv;
+ virDomainCapsLaunchSecurity launchSecurity;
/* add new domain features here */
virTristateBool features[VIR_DOMAIN_CAPS_FEATURE_LAST];
diff --git a/src/conf/schemas/domaincaps.rng b/src/conf/schemas/domaincaps.rng
index e7aa4a1066..b8115fe028 100644
--- a/src/conf/schemas/domaincaps.rng
+++ b/src/conf/schemas/domaincaps.rng
@@ -285,6 +285,13 @@
+
+
+
+
+
+
+
@@ -317,6 +324,9 @@
+
+
+