diff options
author | Dr. David Alan Gilbert | 2018-03-12 18:21:10 +0100 |
---|---|---|
committer | Michael S. Tsirkin | 2018-03-20 04:03:28 +0100 |
commit | 9bb38019942c2f3f44b98f5830e369faec701e55 (patch) | |
tree | d42fffa5fe804263eac636881f1ea1aa1edfcbf7 /docs/interop | |
parent | libvhost-user+postcopy: Register new regions with the ufd (diff) | |
download | qemu-9bb38019942c2f3f44b98f5830e369faec701e55.tar.gz qemu-9bb38019942c2f3f44b98f5830e369faec701e55.tar.xz qemu-9bb38019942c2f3f44b98f5830e369faec701e55.zip |
vhost+postcopy: Send address back to qemu
We need a better way, but at the moment we need the address of the
mappings sent back to qemu so it can interpret the messages on the
userfaultfd it reads.
This is done as a 3 stage set:
QEMU -> client
set_mem_table
mmap stuff, get addresses
client -> qemu
here are the addresses
qemu -> client
OK - now you can use them
That ensures that qemu has registered the new addresses in it's
userfault code before the client starts accessing them.
Note: We don't ask for the default 'ack' reply since we've got our own.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'docs/interop')
-rw-r--r-- | docs/interop/vhost-user.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/interop/vhost-user.txt b/docs/interop/vhost-user.txt index 0d24203d31..e295ef12ca 100644 --- a/docs/interop/vhost-user.txt +++ b/docs/interop/vhost-user.txt @@ -455,12 +455,21 @@ Master message types Id: 5 Equivalent ioctl: VHOST_SET_MEM_TABLE Master payload: memory regions description + Slave payload: (postcopy only) memory regions description Sets the memory map regions on the slave so it can translate the vring addresses. In the ancillary data there is an array of file descriptors for each memory mapped region. The size and ordering of the fds matches the number and ordering of memory regions. + When VHOST_USER_POSTCOPY_LISTEN has been received, SET_MEM_TABLE replies with + the bases of the memory mapped regions to the master. The slave must + have mmap'd the regions but not yet accessed them and should not yet generate + a userfault event. Note NEED_REPLY_MASK is not set in this case. + QEMU will then reply back to the list of mappings with an empty + VHOST_USER_SET_MEM_TABLE as an acknowledgment; only upon reception of this + message may the guest start accessing the memory and generating faults. + * VHOST_USER_SET_LOG_BASE Id: 6 |