Commits
vhost
Name already in use
Commits on Jun 29, 2017
-
-
vhost-user: Claim support for postcopy
Tell QEMU we understand the protocol features needed for postcopy. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
-
Now that we have the mechanisms in here, allow shared memory in a postcopy. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
-
vhost+postcopy: Wire up POSTCOPY_END notify
Wire up a call to VHOST_USER_POSTCOPY_END message to the vhost clients right before we ask the listener thread to shutdown. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
-
vhost: Add VHOST_USER_POSTCOPY_END message
This message is sent just before the end of postcopy to get the client to stop using userfault since we wont respond to any more requests. It should close userfaultfd so that any other pages get mapped to the backing file automatically by the kernel, since at this point we know we've received everything. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
-
vhu: enable = false on get_vring_base
When we receive a GET_VRING_BASE message set enable = false to stop any new received packets modifying the ring. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
-
vhost+postcopy: Lock around set_mem_table
**HACK - better solution needed ** We have the situation where: qemu bridge send set_mem_table map memory a) mark area with UFD send reply with map addresses b) start using c) receive reply As soon as (a) happens qemu might start seeing faults from memory accesses (but doesn't until b); but it can't process those faults until (c) when it's received the mmap addresses. Make the fault handler spin until it gets the reply in (c). At the very least this needs some proper locks, but preferably we need to split the message. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> -
Clear the area and turn off THP. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
-
Cause the vhost-user client to be woken up whenever: a) We place a page in postcopy mode b) We get a fault and the page has already been received Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
-
vhost+postcopy: Add vhost waker
Register a waker function in vhost-user code to be notified when pages arrive or requests to previously mapped pages get requested. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
-
postcopy: postcopy_notify_shared_wake
Add a hook to allow a client userfaultfd to be 'woken' when a page arrives, and a walker that calls that hook for relevant clients given a RAMBlock and offset. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
-
Send a 'wake' request on a userfaultfd for a shared process. The address in the clients address space is specified together with the RAMBlock it was resolved to. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
-
vhost+postcopy: Resolve client address
Resolve fault addresses read off the clients UFD into RAMBlock and offset, and call back to the postcopy code to ask for the page. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
-
vhost+postcopy: Send requests to source for shared pages
Send requests back to the source for shared page requests. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
-
vhost+postcopy: Stash RAMBlock and offset
Stash the RAMBlock and offset for later use looking up addresses. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
-
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. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
-
vhost+postcopy: Register new regions with the ufd
When new regions are sent to the client using SET_MEM_TABLE, register them with the userfaultfd. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
-
vhost+postcopy: Transmit 'listen' to client
Notify the vhost-user client on reception of the 'postcopy-listen' event from the source. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
-
vhost+postcopy: Register shared ufd with postcopy
Register the UFD that comes in as the response to the 'advise' method with the postcopy code. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
-
postcopy: Allow registering of fd handler
Allow other userfaultfd's to be registered into the fault thread so that handlers for shared memory can get responses. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
-
Open a userfaultfd (on a postcopy_advise) and send it back in the reply to the qemu for it to monitor. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
-
vhub: Support sending fds back to qemu
Allow replies with fds (for postcopy) Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
-
vhost-user: Add 'VHOST_USER_POSTCOPY_ADVISE' message
Wire up a notifier to send a VHOST_USER_POSTCOPY_ADVISE message on an incoming advise. Later patches will fill in the behaviour/contents of the message. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
-
postcopy: Add vhost-user flag for postcopy and check it
Add a vhost feature flag for postcopy support, and use the postcopy notifier to check it before allowing postcopy. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
-
Add a notifier chain for postcopy with a 'reason' flag and an opportunity for a notifier member to return an error. Call it when enabling postcopy. This will initially used to enable devices to declare they're unable to postcopy and later to notify of devices of stages within postcopy. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
-
postcopy: use UFFDIO_ZEROPAGE only when available
Use the recently added migration flag to hold whether each RAMBlock has the UFFDIO_ZEROPAGE capability, use it when it's available. This allows the use of postcopy on tmpfs as well as hugepage backed files. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
-
migration/ram: ramblock_recv_bitmap_test_byte_offset
Utility for testing the map when you already know the offset in the RAMBlock. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
-
Utility to give the offset of a host pointer within a RAMBlock (assuming we already know it's in that RAMBlock) Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
-
migrate: Update ram_block_discard_range for shared
The choice of call to discard a block is getting more complicated for other cases. We use fallocate PUNCH_HOLE in any file cases; it works for both hugepage and for tmpfs. We use the DONTNEED for non-hugepage cases either where they're anonymous or where they're private. Care should be taken when trying other backing files. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
-
RAMBlock/migration: Add migration flags
Add a migration flags field to each RAMBlock so that the migration code can hold a set of private flags on the RAMBlock. Add accessors. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
-
migration: add bitmap for received page
This patch adds ability to track down already received pages, it's necessary for calculation vCPU block time in postcopy migration feature, maybe for restore after postcopy migration failure. Also it's necessary to solve shared memory issue in postcopy livemigration. Information about received pages will be transferred to the software virtual bridge (e.g. OVS-VSWITCHD), to avoid fallocate (unmap) for already received pages. fallocate syscall is required for remmaped shared memory, due to remmaping itself blocks ioctl(UFFDIO_COPY, ioctl in this case will end with EEXIT error (struct page is exists after remmap). Bitmap is placed into RAMBlock as another postcopy/precopy related bitmaps. Signed-off-by: Alexey Perevalov <a.perevalov@samsung.com>
-
migration: introduce qemu_ufd_copy_ioctl helper
Just for placing auxilary operations inside helper, auxilary operations like: track received pages, notify about copying operation in futher patches. Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Alexey Perevalov <a.perevalov@samsung.com>
-
migration: postcopy_place_page factoring out
Need to mark copied pages as closer as possible to the place where it tracks down. That will be necessary in futher patch. Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Alexey Perevalov <a.perevalov@samsung.com>
-
migration: Make compression_threads use save/load_setup/cleanup()
Once there, be consistent and use compress_thread_{save,load}_{setup,cleanup}. Signed-off-by: Juan Quintela <quintela@redhat.com> -
migration: Convert ram to use new load_setup()/load_cleanup()
Once there, I rename ram_migration_cleanup() to ram_save_cleanup(). Notice that this is the first pass, and I only passed XBZRLE to the new scheme. Moved decoded_buf to inside XBZRLE struct. As a bonus, I don't have to export xbzrle functions from ram.c. Signed-off-by: Juan Quintela <quintela@redhat.com>