On 9/15/21 8:16 AM, Jing Qi wrote:
Hi Michal,
I tried to test the virtio-mem with upstream version v7.7.0-136-g9b49c2c6d3
adding the current patch
(with qemu-6.1.0-7.fc36.x86_64) -
Hey, thanks for that!
<maxMemory slots='16' unit='KiB'>8388608</maxMemory>
<memory unit='KiB'>1179648</memory>
<currentMemory unit='KiB'>1179648</currentMemory>
<memoryBacking>
<allocation mode='immediate'/>
</memoryBacking>
....
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu64</model>
<numa>
<cell id='0' cpus='0-1' memory='1048576'
unit='KiB' discard='yes'/>
</numa>
</cpu>
...
<memory model='virtio-mem'>
<source>
<nodemask>0</nodemask>
<pagesize unit='KiB'>2048</pagesize>
</source>
<target>
<size unit='KiB'>131072</size>
<node>0</node>
<block unit='KiB'>2048</block>
<requested unit='KiB'>131072</requested>
</target>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x03'
function='0x0'/>
</memory>
The vm was started successfully and there was no "prealloc: true" in the
command line.
But I also found when <allocation mode='immediate'/> was added in the
domain and the "virtio-mem" device was not added, the qemu command line
also didn't have "prealloc:true". Is this correct? This result is
different in "libvirt-7.6.0-3.module+el8.5.0+12510+80564ecf.x86_64" &
"qemu-kvm-6.0.0-29.module+el8.5.0+12386+43574bac.x86_64".
This doesn't sound correct. But I'm unable to reproduce locally. Can you
please share your domain XML that's failing?
Michal