<domainCapabilities>
</pre>
+ <h3><a id="elementsMemoryBacking">Memory Backing</a></h3>
+
+ <p>
+ The <code>memory backing</code> element indicates whether or not
+ <a href="formatdomain.html#memory-backing">memory backing</a>
+ is supported.
+ </p>
+
+<pre>
+<domainCapabilities>
+ ...
+ <memoryBacking supported='yes'>
+ <enum name='sourceType'>
+ <value>anonymous</value>
+ <value>file</value>
+ <value>memfd</value>
+ </enum>
+ </memoryBacking>
+ ...
+<domainCapabilities>
+</pre>
+
+ <dl>
+ <dt><code>sourceType</code></dt>
+ <dd>Options for the <code>type</code> attribute of the
+ <memoryBacking><source> element.</dd>
+ </dl>
+
<h3><a id="elementsDevices">Devices</a></h3>
<p>
<optional>
<ref name="cpu"/>
</optional>
+ <optional>
+ <ref name="memoryBacking"/>
+ </optional>
<optional>
<ref name="devices"/>
</optional>
</element>
</define>
+ <define name="memoryBacking">
+ <element name="memoryBacking">
+ <ref name="supported"/>
+ <ref name="enum"/>
+ </element>
+ </define>
+
<define name="devices">
<element name="devices">
<optional>
virBufferAddLit(buf, "</cpu>\n");
}
+static void
+virDomainCapsMemoryBackingFormat(virBuffer *buf,
+ const virDomainCapsMemoryBacking *memoryBacking)
+{
+ FORMAT_PROLOGUE(memoryBacking);
+
+ ENUM_PROCESS(memoryBacking, sourceType, virDomainMemorySourceTypeToString);
+
+ FORMAT_EPILOGUE(memoryBacking);
+}
+
+
static void
virDomainCapsDeviceDiskFormat(virBuffer *buf,
const virDomainCapsDeviceDisk *disk)
virDomainCapsOSFormat(&buf, &caps->os);
virDomainCapsCPUFormat(&buf, &caps->cpu);
+ virDomainCapsMemoryBackingFormat(&buf, &caps->memoryBacking);
+
virBufferAddLit(&buf, "<devices>\n");
virBufferAdjustIndent(&buf, 2);
virDomainCapsLoader loader; /* Info about virDomainLoaderDef */
};
+STATIC_ASSERT_ENUM(VIR_DOMAIN_MEMORY_SOURCE_LAST);
+typedef struct _virDomainCapsMemoryBacking virDomainCapsMemoryBacking;
+struct _virDomainCapsMemoryBacking {
+ virTristateBool supported;
+ virDomainCapsEnum sourceType; /* virDomainMemorySource */
+};
+
STATIC_ASSERT_ENUM(VIR_DOMAIN_DISK_DEVICE_LAST);
STATIC_ASSERT_ENUM(VIR_DOMAIN_DISK_BUS_LAST);
STATIC_ASSERT_ENUM(VIR_DOMAIN_DISK_MODEL_LAST);
virDomainCapsOS os;
virDomainCapsCPU cpu;
+ virDomainCapsMemoryBacking memoryBacking;
virDomainCapsDeviceDisk disk;
virDomainCapsDeviceGraphics graphics;
virDomainCapsDeviceVideo video;