<section node='1' size='262144' unit='KiB'/>
</sections>
</sgx>
+ <hyperv supported='yes'>
+ <enum name='features'>
+ <value>relaxed</value>
+ <value>vapic</value>
+ </enum>
+ </hyperv>
</features>
</domainCapabilities>
``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 ``<hyperv/>`` element
+(well, its children) as documented in `Hypervisor features
+<formatdomain.html#hypervisor-features>`__
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++)
virBufferAddLit(buf, "</sgx>\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)
virDomainCapsFeatureSEVFormat(&childBuf, caps->sev);
virDomainCapsFeatureSGXFormat(&childBuf, caps->sgx);
+ virDomainCapsFeatureHypervFormat(&childBuf, caps->hyperv);
virXMLFormatElement(buf, "features", NULL, &childBuf);
}
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,
virDomainCapsFeatureGIC gic;
virSEVCapability *sev;
virSGXCapability *sgx;
+ virDomainCapsFeatureHyperv *hyperv;
/* add new domain features here */
virTristateBool features[VIR_DOMAIN_CAPS_FEATURE_LAST];
<optional>
<ref name="sgx"/>
</optional>
+ <optional>
+ <ref name="hyperv"/>
+ </optional>
</element>
</define>
</element>
</define>
+ <define name="hyperv">
+ <element name="hyperv">
+ <ref name="supported"/>
+ <ref name="enum"/>
+ </element>
+ </define>
+
<define name="value">
<zeroOrMore>
<element name="value">