[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Converting host virtual addresses to guest physical
From: |
Padmanabhan S N |
Subject: |
[Qemu-devel] Converting host virtual addresses to guest physical |
Date: |
Thu, 7 Sep 2017 13:02:59 +0000 (UTC) |
I'm developing a new block backend driver. Since my Guest RAM is coming out of
shared memory (memory-backend-file,mem-path=/dev/shmem/foo), while performing
the IO I would like to pass QEMUIOVector buffers directly to another user-space
process running on the same host to enable zerocopy. Can someone help me
understand the different memory regions that are mapped in the qemu process
address space and how they map to each other ?
1. My guest is configured with 1G RAM. /proc/<pid>/maps on the qemu process
shows two 1G regions that are mapped. One of them is /dev/shmem/foo, which I
believe corresponds to the guest physical memory. What is the other 1G region ?
2. The QEMUIOVector buffers point to this 'other' 1G region that I referred
above. How do I convert these pointers to locations in the /dev/shmem/foo
region ? My plan is to convert the QEMUIOVector buffer pointer to a region in
/dev/shmem/foo and pass that pointer to another userspace process that also has
the /dev/shmem/foo region mapped.
I understand vhost-user might be the right way to approach this problem.
However I'm currently working with qemu-2.8 and it looks neither
vhost-user-scsi nor vhost-user-blk are available in that version. If you
believe there is a better approach to solve this problem, let me know.
Thanks,Paddy.
- [Qemu-devel] Converting host virtual addresses to guest physical,
Padmanabhan S N <=