On 6/18/2019 1:12 AM, Gerd Hoffmann wrote:
On Mon, Jun 17, 2019 at 11:14:59AM -0700, elena.ufimts...@oracle.com wrote:
From: Jagannathan Raman <jag.ra...@oracle.com>

Allow RAM MemoryRegion to be created from an offset in a file, instead
of allocating at offset of 0 by default. This is needed to synchronize
RAM between QEMU & remote process.
This will be needed for the following patches.

Details please.   vhost-user works fine without this ...

Hi Gerd,

Sorry for the delayed response.

vhost-user doesn't use qemu_ram_alloc_from_fd(), it directly calls
mmap() to map the RAM onto the remote process.

Secondly, vhost-user uses its own functions (like vu_gpa_to_va()) for
address translation, whereas multi-process uses QEMU's existing
functions (address_space_rw()). Therefore, multi-process needs to use
qemu_ram_alloc_from_fd().

Lastly, updates to the system memory (received via MemoryListener) are
often in segments and not contiguous. Therefore, mapping these segments
in the remote process is possible only if we are able to allocate a
MemoryRegion at an offset in the memory backend.

Thanks!
--
Jag


cheers,
   Gerd



Reply via email to