mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
0ccceaa57c
The existing auto-align behavior for pSeries has the idea to alleviate user configuration of the NVDIMM size, given that the alignment calculation is not trivial to do (256MiB alignment of mem->size - mem->label_size value, a.k.a guest area). We align mem->size down to avoid end of file problems. The end result is not ideal though. We do not touch the domain XML, meaning that the XML can report a NVDIMM size 255MiB smaller than the actual size the guest is seeing. It also adds one more thing to consider in case the guest is reporting less memory than declared, since the auto-align is transparent to the user. Following Andrea's suggestion in [1], let's instead do an size alignment validation. If the NVDIMM is unaligned, error out and suggest a rounded up value. This can be bothersome to users, but will bring consistency of NVDIMM size between the domain XML and the guest. This approach will force existing non-running pSeries guests to readjust the NVDIMM value in their XMLs, if necessary. No changes were made for x86 NVDIMM support. [1] https://www.redhat.com/archives/libvir-list/2020-July/msg01471.html Suggested-by: Andrea Bolognani <abologna@redhat.com> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
51 lines
1.5 KiB
XML
51 lines
1.5 KiB
XML
<domain type='qemu'>
|
|
<name>QEMUGuest1</name>
|
|
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
|
<maxMemory slots='16' unit='KiB'>1099511627776</maxMemory>
|
|
<memory unit='KiB'>1267710</memory>
|
|
<currentMemory unit='KiB'>1267710</currentMemory>
|
|
<vcpu placement='static' cpuset='0-1'>2</vcpu>
|
|
<os>
|
|
<type arch='ppc64' machine='pseries'>hvm</type>
|
|
<boot dev='hd'/>
|
|
</os>
|
|
<cpu>
|
|
<topology sockets='2' dies='1' cores='1' threads='1'/>
|
|
<numa>
|
|
<cell id='0' cpus='0-1' memory='1048576' unit='KiB'/>
|
|
</numa>
|
|
</cpu>
|
|
<clock offset='utc'/>
|
|
<on_poweroff>destroy</on_poweroff>
|
|
<on_reboot>restart</on_reboot>
|
|
<on_crash>destroy</on_crash>
|
|
<devices>
|
|
<emulator>/usr/bin/qemu-system-ppc64</emulator>
|
|
<controller type='usb' index='0'>
|
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
|
|
</controller>
|
|
<controller type='pci' index='0' model='pci-root'>
|
|
<model name='spapr-pci-host-bridge'/>
|
|
<target index='0'/>
|
|
</controller>
|
|
<memballoon model='virtio'>
|
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
|
|
</memballoon>
|
|
<panic model='pseries'/>
|
|
<memory model='nvdimm'>
|
|
<uuid>49545eb3-75e1-2d0a-acdd-f0294406c99e</uuid>
|
|
<source>
|
|
<path>/tmp/nvdimm</path>
|
|
</source>
|
|
<target>
|
|
<size unit='KiB'>786560</size>
|
|
<node>0</node>
|
|
<label>
|
|
<size unit='KiB'>128</size>
|
|
</label>
|
|
</target>
|
|
<address type='dimm' slot='0'/>
|
|
</memory>
|
|
</devices>
|
|
</domain>
|