qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v1] vhost-user: fix not send all hugepage files


From: Linhaifeng
Subject: Re: [Qemu-devel] [PATCH v1] vhost-user: fix not send all hugepage files to vhost-user
Date: Sun, 15 Feb 2015 20:07:54 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Thunderbird/31.1.0


On 2015/2/2 7:29, Paolo Bonzini wrote:
> 
> 
> On 17/12/2014 07:02, address@hidden wrote:
>> From: linhaifeng <address@hidden>
>>
>> If we create VM with two or more numa nodes qemu will create two
>> or more hugepage files but qemu only send one hugepage file fd
>> to vhost-user when VM's memory size is 2G and with two numa nodes.
>>
>> Signed-off-by: linhaifeng <address@hidden>
> 
> The bug is in vhost_dev_assign_memory.  It doesn't check that the file
> descriptor matches when merging regions.  Michael, does the merging
> trigger in practice?  Can we just eliminate it?
> 
> Paolo
> 

qemu-system-x86_64 -name vm1 -enable-kvm -smp 2 -m 2048 -object 
memory-backend-file,id=mem1,size=1024M,mem-path=/dev/hugepages,share=on -object 
memory-backend-file,id=mem2,size=1024M,mem-path=/dev/hugepages,share=on -numa 
node,memdev=mem1 -numa node,memdev=mem2 -chardev 
socket,id=chr0,path=/var/run/vhost-user/tap10  -netdev 
type=vhost-user,id=net0,chardev=chr0,vhostforce -device 
virtio-net-pci,netdev=net0,mac=00:00:00:00:00:01,csum=off,gso=off,guest_tso4=off,guest_tso6=off,guest_ecn=off
 -drive file=/mnt/sdc/linhf/suse11_sp3_64_0 -vnc :0
hugepage file fd=8 addr=0x7f1ea7200000 size=1073741824
hugepage file fd=9 addr=0x7f1ee7200000 size=1073741824
qemu-system-x86_64: -netdev type=vhost-user,id=net0,chardev=chr0,vhostforce: 
chardev "chr0" went up

WARNING: Image format was not specified for '/mnt/sdc/linhf/suse11_sp3_64_0' 
and probing guessed raw.
         Automatically detecting the format is dangerous for raw images, write 
operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.
reg->userspace_addr=0x7f1ea72c0000 ram_addr=0xc0000 fd=8
reg->userspace_addr=0x7f1e9ee00000 ram_addr=0x80000000 fd=-1
reg->userspace_addr=0x7f1ea7200000 ram_addr=0x0 fd=8


It seems like the second region's address is invalid(not in the hugepage's 
area).
so we lost this region.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]