[libvirt-users] is memoryBacking support 'share' and 'mem-path' parameter

Linhaifeng haifeng.lin at huawei.com
Thu Oct 9 01:54:44 UTC 2014



On 2014/10/8 16:57, Martin Kletzander wrote:
> On Wed, Oct 08, 2014 at 10:03:47AM +0800, Linhaifeng wrote:
>> Hi,
>>
>> I want to use this qemu command '-object memory-backend-file,id=mem,size=2048M,mem-path=/mnt/huge,share=on' with libvirt but i can't find the 'mem-path' and 'share' in the documentation.
>> because the vhost-user backend based on 'share=on' parameter and libvirt support vhostuser i guess there maybe another way to support this parameter?
>>
>> this is my xml:
>>  <cpu>
>>    <numa>
>>      <cell id='0' cpus='0' memory='1048576' memAccess='shared'/>
>>      <cell id='1' cpus='1' memory='1048576' memAccess='shared'/>
> 
> this memAccess='shared' is exactly what you need in order for the
> share='on' to be appended.  I wonder why it's not there.  What libvirt
> version are you using?

-bash-4.2# virsh --version
1.2.7


> 
>>    </numa>
>>  </cpu>
>> <memoryBacking>
>>    <hugepages>
>>      <page size="2" unit="M" nodeset="0,1"/>
>>    </hugepages>
>>    <!--nosharepages/-->
>>    <!--locked/-->
>> </memoryBacking>
>>
>>
>>    <interface type='vhostuser'>
>>      <mac address='52:54:00:3b:83:1a'/>
>>      <source type='unix' path='/path/port1' mode='client'/>
>>      <model type='virtio'/>
>>    </interface>
>>    <interface type='vhostuser'>
>>      <mac address='52:54:00:3b:83:1b'/>
>>      <source type='unix' path='/path/port2' mode='client'/>
>>      <model type='virtio'/>
>>    </interface>
>>
>>
>> when i create the VM the qemu command is like this without 'share=on' parameter:
>> -object memory-backend-file,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu,size=1024M,id=ram-node0 -numa node,nodeid=0,cpus=0,memdev=ram-node0
>> -object memory-backend-file,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu,size=1024M,id=ram-node1 -numa node,nodeid=1,cpus=1,memdev=ram-node1
>>
>> _______________________________________________
>> libvirt-users mailing list
>> libvirt-users at redhat.com
>> https://www.redhat.com/mailman/listinfo/libvirt-users




More information about the libvirt-users mailing list