On 2016/01/12 4:20, Markus Armbruster wrote: > Marc-André Lureau <marcandre.lur...@gmail.com> writes: > >> Hi >> >> On Fri, Dec 4, 2015 at 3:55 PM, Tetsuya Mukawa <muk...@igel.co.jp> wrote: >>>> What's the use case or test case? >>> One of example is userspace device driver like DPDK PMD. >>> Actually, I've found this fd related behavior using DPDK virtio-net PMD. >>> Could you please check below to know my use case more? >>> http://thread.gmane.org/gmane.comp.networking.dpdk.devel/28467/focus=28493 >> Thanks. Why not use memory-backend-file with share=on ? I think I >> understand you want to use the same BAR address as the host shared >> memory location to avoid extra offset computation. I don't know about >> the limitations here. Is this extra offset really worth saving? >> Finally, I wonder what qemu is really doing in the end ;) > Tetsuya, I still don't understand what you're trying to accomplish.
Hi Markus, Please let me describe it more. We have below test program for vhost-user. - ./tests/vhost-user-test.c This program doesn't share memory between test process and QEMU process. So all memory accesses are sent as qtest command. If both process has a shared memory that can be accessed using same address by both processes, we can reduce above memory accessing overhead. This is what I want to do. So far, when vhost-user is used, the memory will not be shared because fd isn't kept. This is what I want to fix. > I concur with Marc-André that -object memory-backend-FOO is how we > allocate a memory object for something else to use. I am not so familiar with QEMU memory architecture. So please let me make sure. Does vhost-user only works with memory backend objects? If it's correct, in my case, I want to use an unix domain socket to transfer fd of the shared memory. To do that, do you suggest me to add 'chardev' parameter to ./backend/hostmem-file.c? Tetsuya > >> Michael, could you comment about this vhost-user use case? (see above >> linked thread)