diff --git a/docs/formatdomaincaps.rst b/docs/formatdomaincaps.rst
index 532fea0f60..dc227e9d02 100644
--- a/docs/formatdomaincaps.rst
+++ b/docs/formatdomaincaps.rst
@@ -624,6 +624,12 @@ capabilities. All features occur as children of the main ``features`` element.
+
+
+ relaxed
+ vapic
+
+
@@ -733,3 +739,12 @@ document store. In order to use SGX with libvirt have a look at `SGX in domain X
``sections``
The sections of the SGX enclave page cache (called EPC).
+
+
+Hyper-V Enlightenments
+^^^^^^^^^^^^^^^^^^^^^^
+
+Report which features improving behavior of guests running Microsoft Windows
+are supported. The ``features`` enum corresponds to the ```` element
+(well, its children) as documented in `Hypervisor features
+`__
diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c
index edaa8df6ac..7c30e629c7 100644
--- a/src/conf/domain_capabilities.c
+++ b/src/conf/domain_capabilities.c
@@ -100,6 +100,7 @@ virDomainCapsDispose(void *obj)
virCPUDefFree(caps->cpu.hostModel);
virSEVCapabilitiesFree(caps->sev);
virSGXCapabilitiesFree(caps->sgx);
+ g_free(caps->hyperv);
values = &caps->os.loader.values;
for (i = 0; i < values->nvalues; i++)
@@ -678,6 +679,20 @@ virDomainCapsFeatureSGXFormat(virBuffer *buf,
virBufferAddLit(buf, "\n");
}
+static void
+virDomainCapsFeatureHypervFormat(virBuffer *buf,
+ const virDomainCapsFeatureHyperv *hyperv)
+{
+ if (!hyperv)
+ return;
+
+ FORMAT_PROLOGUE(hyperv);
+
+ ENUM_PROCESS(hyperv, features, virDomainHypervTypeToString);
+
+ FORMAT_EPILOGUE(hyperv);
+}
+
static void
virDomainCapsFormatFeatures(const virDomainCaps *caps,
virBuffer *buf)
@@ -698,6 +713,7 @@ virDomainCapsFormatFeatures(const virDomainCaps *caps,
virDomainCapsFeatureSEVFormat(&childBuf, caps->sev);
virDomainCapsFeatureSGXFormat(&childBuf, caps->sgx);
+ virDomainCapsFeatureHypervFormat(&childBuf, caps->hyperv);
virXMLFormatElement(buf, "features", NULL, &childBuf);
}
diff --git a/src/conf/domain_capabilities.h b/src/conf/domain_capabilities.h
index 1d504a3506..770856bf53 100644
--- a/src/conf/domain_capabilities.h
+++ b/src/conf/domain_capabilities.h
@@ -158,6 +158,13 @@ struct _virDomainCapsFeatureGIC {
virDomainCapsEnum version; /* Info about virGICVersion */
};
+STATIC_ASSERT_ENUM(VIR_DOMAIN_HYPERV_LAST);
+typedef struct _virDomainCapsFeatureHyperv virDomainCapsFeatureHyperv;
+struct _virDomainCapsFeatureHyperv {
+ virTristateBool supported;
+ virDomainCapsEnum features; /* Info about supported virDomainHyperv features */
+};
+
typedef enum {
VIR_DOMCAPS_CPU_USABLE_UNKNOWN,
VIR_DOMCAPS_CPU_USABLE_YES,
@@ -263,6 +270,7 @@ struct _virDomainCaps {
virDomainCapsFeatureGIC gic;
virSEVCapability *sev;
virSGXCapability *sgx;
+ virDomainCapsFeatureHyperv *hyperv;
/* 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 b6408bca88..4b96e89dfa 100644
--- a/src/conf/schemas/domaincaps.rng
+++ b/src/conf/schemas/domaincaps.rng
@@ -296,6 +296,9 @@
+
+
+
@@ -396,6 +399,13 @@
+
+
+
+
+
+
+