vhost-user:Bad ram offset
Hi,all
VM use vhost-user backend cannot startup when memory bigger than 3.5G.The log print "Bad ram offset 100000000" .Is this a bug?
log:
[2014-11-01T08:39:07.245324Z] virtio_set_status:524 virtio-net device status is 1 that means ACKNOWLEDGE [2014-11-01T08:39:07.247225Z] virtio_set_status:524 virtio-balloon device status is 1 that means ACKNOWLEDGE [2014-11-01T08:39:07.320191Z] virtio_set_status:524 virtio-net device status is 3 that means DRIVER Bad ram offset 100000000
[2014-11-01 08:39:07]: shutting down
command:/usr/bin/qemu-system-x86_64 -name vm1
-smp 4
-drive file=/mnt/sdb/linhf/imgs/vm1.img,if=none,id=drive-ide0-0-0,format=raw,cache=none,aio=native -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
-chardev socket,id=charnet0,path=/var/run/vhost-user/port1 -netdev type=vhost-user,id=hostnet0,chardev=charnet0 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:00:00:00:00:01,bus=pci.0,addr=0x3 \
-enable-kvm -mem-prealloc -object memory-backend-file,id=mem,size=3968M,mem-path=/dev/hugepages,share=on -numa node,memdev=mem
when memory is smaller than 3.5G VM would run well.
Signature · 2 lines
Regards, Haifeng
Quoted 19 lines · Linhaifeng
Hi,all
VM use vhost-user backend cannot startup when memory bigger than 3.5G.The log print "Bad ram offset 100000000" .Is this a bug?
log:
[2014-11-01T08:39:07.245324Z] virtio_set_status:524 virtio-net device status is 1 that means ACKNOWLEDGE [2014-11-01T08:39:07.247225Z] virtio_set_status:524 virtio-balloon device status is 1 that means ACKNOWLEDGE [2014-11-01T08:39:07.320191Z] virtio_set_status:524 virtio-net device status is 3 that means DRIVER Bad ram offset 100000000
[2014-11-01 08:39:07]: shutting downcommand:
/usr/bin/qemu-system-x86_64-name vm1(quoted diff) +0
-4-smp 4 -drive file=/mnt/sdb/linhf/imgs/vm1.img,if=none,id=drive-ide0-0-0,format=raw,cache=none,aio=native -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \ -chardev socket,id=charnet0,path=/var/run/vhost-user/port1 -netdev type=vhost-user,id=hostnet0,chardev=charnet0 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:00:00:00:00:01,bus=pci.0,addr=0x3 \ -enable-kvm -mem-prealloc -object memory-backend-file,id=mem,size=3968M,mem-path=/dev/hugepages,share=on -numa node,memdev=mem
Quoted 1 line
when memory is smaller than 3.5G VM would run well.
I reproduced this.
Interestingly, this does not trigger with 4096.
It does trigger with 3968.
Quoted 4 lines
Signature · 3 lines
-- Regards, Haifeng
Quoted 19 lines · Linhaifeng
Hi,all
VM use vhost-user backend cannot startup when memory bigger than 3.5G.The log print "Bad ram offset 100000000" .Is this a bug?
log:
[2014-11-01T08:39:07.245324Z] virtio_set_status:524 virtio-net device status is 1 that means ACKNOWLEDGE [2014-11-01T08:39:07.247225Z] virtio_set_status:524 virtio-balloon device status is 1 that means ACKNOWLEDGE [2014-11-01T08:39:07.320191Z] virtio_set_status:524 virtio-net device status is 3 that means DRIVER Bad ram offset 100000000
[2014-11-01 08:39:07]: shutting downcommand:
/usr/bin/qemu-system-x86_64-name vm1(quoted diff) +0
-4-smp 4 -drive file=/mnt/sdb/linhf/imgs/vm1.img,if=none,id=drive-ide0-0-0,format=raw,cache=none,aio=native -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \ -chardev socket,id=charnet0,path=/var/run/vhost-user/port1 -netdev type=vhost-user,id=hostnet0,chardev=charnet0 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:00:00:00:00:01,bus=pci.0,addr=0x3 \ -enable-kvm -mem-prealloc -object memory-backend-file,id=mem,size=3968M,mem-path=/dev/hugepages,share=on -numa node,memdev=mem
Quoted 2 lines
when memory is smaller than 3.5G VM would run well.
I just sent a patch to fix this:
vhost-user: fix mmap offset calculation
Quoted 3 lines
Signature · 2 lines
Regards, Haifeng