libvhost-user: Fix some memtable remap cases
commit49e9ec749d4db62ae51f76354143cee183912a1d
authorDr. David Alan Gilbert <dgilbert@redhat.com>
Mon, 12 Aug 2019 16:35:19 +0000 (12 17:35 +0100)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Thu, 23 Jan 2020 16:41:37 +0000 (23 16:41 +0000)
treed401953a743b16c3b3c12851e5ac669a6bb2f542
parent1222f015558fc34cea02aa3a5a92de608c82cec8
libvhost-user: Fix some memtable remap cases

If a new setmemtable command comes in once the vhost threads are
running, it will remap the guests address space and the threads
will now be looking in the wrong place.

Fortunately we're running this command under lock, so we can
update the queue mappings so that threads will look in the new-right
place.

Note: This doesn't fix things that the threads might be doing
without a lock (e.g. a readv/writev!)  That's for another time.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
contrib/libvhost-user/libvhost-user.c
contrib/libvhost-user/libvhost-user.h