conf: Add support for parsing and formatting max memory and slot count

Add a XML element that will allow to specify maximum supportable memory
and the count of memory slots to use with memory hotplug.

To avoid possible confusion and misuse of the new element this patch
also explicitly forbids the use of the maxMemory setting in individual
drivers's post parse callbacks. This limitation will be lifted when the
support is implemented.
This commit is contained in:
Peter Krempa
2015-03-23 14:25:14 +01:00
parent 19e85d8454
commit bffb9163a1
19 changed files with 186 additions and 9 deletions
+20
View File
@@ -675,6 +675,7 @@
<pre>
&lt;domain&gt;
...
&lt;maxMemory slots='16' unit='KiB'&gt;1524288&lt;/maxMemory&gt;
&lt;memory unit='KiB'&gt;524288&lt;/memory&gt;
&lt;currentMemory unit='KiB'&gt;524288&lt;/currentMemory&gt;
...
@@ -708,6 +709,25 @@
<span class='since'><code>unit</code> since 0.9.11</span>,
<span class='since'><code>dumpCore</code> since 0.10.2
(QEMU only)</span></dd>
<dt><code>maxMemory</code></dt>
<dd>The run time maximum memory allocation of the guest. The initial
memory specified by either the <code>&lt;memory&gt;</code> element or
the NUMA cell size configuration can be increased by hot-plugging of
memory to the limit specified by this element.
The <code>unit</code> attribute behaves the same as for
<code>&lt;memory&gt;</code>.
The <code>slots</code> attribute specifies the number of slots
available for adding memory to the guest. The bounds are hypervisor
specific.
Note that due to alignment of the memory chunks added via memory
hotplug the full size allocation specified by this element may be
impossible to achieve.
<span class='since'>Since 1.2.14</span>
</dd>
<dt><code>currentMemory</code></dt>
<dd>The actual allocation of memory for the guest. This value can
be less than the maximum allocation, to allow for ballooning
+8
View File
@@ -592,6 +592,14 @@
</optional>
</element>
</optional>
<optional>
<element name="maxMemory">
<ref name="scaledInteger"/>
<attribute name="slots">
<ref name="unsignedInt"/>
</attribute>
</element>
</optional>
<optional>
<element name="currentMemory">
<ref name='scaledInteger'/>