qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Converting host virtual addresses to guest physical


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] Converting host virtual addresses to guest physical
Date: Tue, 12 Sep 2017 11:36:25 +0100
User-agent: Mutt/1.8.3 (2017-05-23)

On Thu, Sep 07, 2017 at 01:02:59PM +0000, Padmanabhan S N via Qemu-devel wrote:
> 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.

Please post the full QEMU command-line and /proc/<pid>/maps.

> 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.

Are you sure that QEMU 2.8 will still be relevant by the time your block
driver is production-ready?

Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]