From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53749) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEZCm-0000Rf-MI for qemu-devel@nongnu.org; Mon, 13 Jul 2015 04:35:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZEZCl-0001HK-0O for qemu-devel@nongnu.org; Mon, 13 Jul 2015 04:35:16 -0400 Received: from mail-oi0-x232.google.com ([2607:f8b0:4003:c06::232]:33596) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEZCk-0001GM-P9 for qemu-devel@nongnu.org; Mon, 13 Jul 2015 04:35:14 -0400 Received: by oiyy130 with SMTP id y130so249014273oiy.0 for ; Mon, 13 Jul 2015 01:35:13 -0700 (PDT) MIME-Version: 1.0 Sender: teja.foundation@gmail.com Date: Mon, 13 Jul 2015 14:05:12 +0530 Message-ID: From: Naredula Janardhana Reddy Content-Type: multipart/alternative; boundary=001a113d5650ade828051abd9903 Subject: [Qemu-devel] vhost-user memory regions. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --001a113d5650ade828051abd9903 Content-Type: text/plain; charset=UTF-8 In the QEMU 2.3.0 , The memory regions published to user space application is limited address space, not the complete memory regions of quest vm, due to this , the user level app cannot decode all the memory block addresses. This is needed for reading the packet from virtio ring. Is there any configuration in qemu to overcome the above or it is bug in virtio-user?. Test details: Qemu cmd line: /opt/qemu.2.3.0/bin/qemu-system-x86_64 -enable-kvm -gdb tcp::1336,server,nowait -monitor tcp::51008,server,nowait,nodelay -m 256M -mem-path /hugetlbfs -mem-prealloc -smp 2 -chardev backend=socket,id=ch1,path=/opt_src/port1 -netdev vhost-user,id=guest0,chardev=ch1 -device virtio-net-pci,mac=00:30:48:DB:5E:01,netdev=guest0,mq=on,vectors=8 -vnc :8 -serial telnet::50008,server,nowait -daemonize -append net_send_int_disable=1 ipaddr=192.168.122.3 gw=192.168.122.1 nic_intr_off=1 netbh_tightloop=0 page_cache=1 -kernel /opt_src/jiny/jiny_image.bin -drive if=virtio,id=hdr0,file=/opt_src/jiny/disk In the below message The below is message recevied at the user level application from vhost-user(qemu), the size is only 655k. but needed is 256M(size of memory or shared memory size of hugetlb). I have Temporarly hardcoded the size in the app by changing the size to 256M from 655K. so that network packet address can able to decode from the virtio ring. Cmd: VHOST_USER_SET_MEM_TABLE (0x5) flags: 0x1 regions: 2 region: gpa = 0x0 size = 655360 ua = 0x2aaaaac00000 region: gpa = 0x0 size = 786432 ua = 0xff40000 Thanks Jana --001a113d5650ade828051abd9903 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

In the QEMU 2.3.0 , The memory re= gions published to user space application is limited address space, not the= complete memory regions of quest vm, due to this , the user level app cann= ot decode all the memory block addresses.=C2=A0 This is needed for reading = the packet from virtio ring.

Is there any configuration= =C2=A0 in qemu to overcome the above=C2=A0 or it is bug in virtio-user?.
Test details:
Qemu cmd line:
=C2=A0=C2=A0= =C2=A0 /opt/qemu.2.3.0/bin/qemu-system-x86_64 -enable-kvm -gdb tcp::1336,se= rver,nowait
-monitor tcp::51008,server,nowait,nodelay -m 256M -mem-path= /hugetlbfs -mem-prealloc
-smp 2 -chardev backend=3Dsocket,id=3Dch1,pat= h=3D/opt_src/port1 -netdev vhost-user,id=3Dguest0,chardev=3Dch1 -device vir= tio-net-pci,mac=3D00:30:48:DB:5E:01,netdev=3Dguest0,mq=3Don,vectors=3D8 -vn= c :8 -serial telnet::50008,server,nowait -daemonize -append net_send_int_di= sable=3D1 ipaddr=3D192.168.122.3 gw=3D192.168.122.1 nic_intr_off=3D1 netbh_= tightloop=3D0 page_cache=3D1=C2=A0 -kernel /opt_src/jiny/jiny_image.bin -dr= ive if=3Dvirtio,id=3Dhdr0,file=3D/opt_src/jiny/disk
In the be= low message

The below is message recevied at the user lev= el application from vhost-user(qemu), the size is only 655k.=C2=A0 but need= ed is 256M(size of=C2=A0 memory or shared memory size of hugetlb).=C2=A0 I = have Temporarly hardcoded the size in the app by changing the size to 256M = from 655K. so that network packet address can able to decode from=C2=A0 the= virtio ring.

Cmd: VHOST_USER_SET_MEM_TABLE (0x5)
flags: 0x1
r= egions: 2
region:
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 gpa =3D = 0x0
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 size =3D 655360
=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ua =3D 0x2aaaaac00000
region:
= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 gpa =3D 0x0
=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 size =3D 786432
=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 ua =3D 0xff40000



Thanks
=
Jana
--001a113d5650ade828051abd9903--