mirror of
https://github.com/libvirt/libvirt.git
synced 2026-09-03 20:53:04 -05:00
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:
@@ -675,6 +675,7 @@
|
||||
<pre>
|
||||
<domain>
|
||||
...
|
||||
<maxMemory slots='16' unit='KiB'>1524288</maxMemory>
|
||||
<memory unit='KiB'>524288</memory>
|
||||
<currentMemory unit='KiB'>524288</currentMemory>
|
||||
...
|
||||
@@ -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><memory></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><memory></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
|
||||
|
||||
@@ -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'/>
|
||||
|
||||
Reference in New Issue
Block a user