[dpdk-dev] [PATCH] vhost: fix mem share between VM and host

2016-04-12 Thread Yuanhan Liu
On Mon, Apr 11, 2016 at 06:22:12AM +, Xie, Huawei wrote: > On 4/11/2016 1:29 AM, Zhe Tao wrote: > > > > +/* Check the share memory in case the QEMU doesn't set the share option > > + * as on for the memory-backend-file object in the QEMU command line. > > + */ > > + > > +int > > +vhost_check_

[dpdk-dev] [PATCH] vhost: fix mem share between VM and host

2016-04-11 Thread Xie, Huawei
On 4/11/2016 1:29 AM, Zhe Tao wrote: > > +/* Check the share memory in case the QEMU doesn't set the share option > + * as on for the memory-backend-file object in the QEMU command line. > + */ > + > +int > +vhost_check_mem_shared(struct vhost_device_ctx ctx) > +{ > + struct virtio_net *dev;

[dpdk-dev] [PATCH] vhost: fix mem share between VM and host

2016-04-11 Thread Zhe Tao
The reason cause this problem is that in QEMU, when assign the memory-backend-file without share option, will cause QEMU mmap the mem file without using the MAP_SHARED flag, so the page cache for that file will not shared between other processes, all the upated to the mapping area in the VM will no

[dpdk-dev] [PATCH] vhost: fix mem share between VM and host

2016-04-10 Thread Thomas Monjalon
2016-04-11 01:28, Zhe Tao: > The reason cause this problem is that in QEMU, when assign the > memory-backend-file without share option, will cause QEMU mmap the mem file > without using the MAP_SHARED flag, so the page cache for that file will not > shared between other processes, all the upated to