Skip to content

Commits

Permalink
vhost
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Commits on Jun 29, 2017

  1. vhost user debug

    dagrh committed Jun 29, 2017
    Copy the full SHA
    05c5a18 View commit details
    Browse the repository at this point in the history
  2. 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>
    dagrh committed Jun 29, 2017
    Copy the full SHA
    8e422b6 View commit details
    Browse the repository at this point in the history
  3. postcopy: Allow shared memory

    Now that we have the mechanisms in here, allow shared memory in a
    postcopy.
    
    Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
    dagrh committed Jun 29, 2017
    Copy the full SHA
    a1cad62 View commit details
    Browse the repository at this point in the history
  4. 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>
    dagrh committed Jun 29, 2017
    Copy the full SHA
    cbf9dd8 View commit details
    Browse the repository at this point in the history
  5. 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>
    dagrh committed Jun 29, 2017
    Copy the full SHA
    78ab71b View commit details
    Browse the repository at this point in the history
  6. 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>
    dagrh committed Jun 29, 2017
    Copy the full SHA
    045d8a2 View commit details
    Browse the repository at this point in the history
  7. 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>
    dagrh committed Jun 29, 2017
    Copy the full SHA
    44db9ca View commit details
    Browse the repository at this point in the history
  8. vub+postcopy: madvises

    Clear the area and turn off THP.
    
    Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
    dagrh committed Jun 29, 2017
    Copy the full SHA
    f990043 View commit details
    Browse the repository at this point in the history
  9. vhost+postcopy: Call wakeups

    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>
    dagrh committed Jun 29, 2017
    Copy the full SHA
    e2d8ba9 View commit details
    Browse the repository at this point in the history
  10. 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>
    dagrh committed Jun 29, 2017
    Copy the full SHA
    513f2de View commit details
    Browse the repository at this point in the history
  11. 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>
    dagrh committed Jun 29, 2017
    Copy the full SHA
    b9d2212 View commit details
    Browse the repository at this point in the history
  12. postcopy: wake shared

    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>
    dagrh committed Jun 29, 2017
    Copy the full SHA
    b797fdc View commit details
    Browse the repository at this point in the history
  13. 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>
    dagrh committed Jun 29, 2017
    Copy the full SHA
    1190c38 View commit details
    Browse the repository at this point in the history
  14. 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>
    dagrh committed Jun 29, 2017
    Copy the full SHA
    c5fdf1b View commit details
    Browse the repository at this point in the history
  15. 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>
    dagrh committed Jun 29, 2017
    Copy the full SHA
    540ee4e View commit details
    Browse the repository at this point in the history
  16. 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>
    dagrh committed Jun 29, 2017
    Copy the full SHA
    46262ac View commit details
    Browse the repository at this point in the history
  17. 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>
    dagrh committed Jun 29, 2017
    Copy the full SHA
    932da05 View commit details
    Browse the repository at this point in the history
  18. 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>
    dagrh committed Jun 29, 2017
    Copy the full SHA
    64a7312 View commit details
    Browse the repository at this point in the history
  19. 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>
    dagrh committed Jun 29, 2017
    Copy the full SHA
    8f59209 View commit details
    Browse the repository at this point in the history
  20. 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>
    dagrh committed Jun 29, 2017
    Copy the full SHA
    b5a8f6a View commit details
    Browse the repository at this point in the history
  21. vhub: Open userfaultfd

    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>
    dagrh committed Jun 29, 2017
    Copy the full SHA
    e807e86 View commit details
    Browse the repository at this point in the history
  22. vhub: Support sending fds back to qemu

    Allow replies with fds (for postcopy)
    
    Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
    dagrh committed Jun 29, 2017
    Copy the full SHA
    fc3a4f0 View commit details
    Browse the repository at this point in the history
  23. 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>
    dagrh committed Jun 29, 2017
    Copy the full SHA
    e7107ea View commit details
    Browse the repository at this point in the history
  24. 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>
    dagrh committed Jun 29, 2017
    Copy the full SHA
    6fed524 View commit details
    Browse the repository at this point in the history
  25. postcopy: Add notifier chain

    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>
    dagrh committed Jun 29, 2017
    Copy the full SHA
    eaf192c View commit details
    Browse the repository at this point in the history
  26. 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>
    dagrh committed Jun 29, 2017
    Copy the full SHA
    d8a5e49 View commit details
    Browse the repository at this point in the history
  27. 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>
    dagrh committed Jun 29, 2017
    Copy the full SHA
    f3da102 View commit details
    Browse the repository at this point in the history
  28. qemu_ram_block_host_offset

    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>
    dagrh committed Jun 29, 2017
    Copy the full SHA
    78934fc View commit details
    Browse the repository at this point in the history
  29. 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>
    dagrh committed Jun 29, 2017
    Copy the full SHA
    eb53952 View commit details
    Browse the repository at this point in the history
  30. 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>
    dagrh committed Jun 29, 2017
    Copy the full SHA
    45617c3 View commit details
    Browse the repository at this point in the history
  31. 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>
    Alexey Perevalov authored and dagrh committed Jun 29, 2017
    Copy the full SHA
    852ba93 View commit details
    Browse the repository at this point in the history
  32. 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>
    Alexey Perevalov authored and dagrh committed Jun 29, 2017
    Copy the full SHA
    6557bb3 View commit details
    Browse the repository at this point in the history
  33. 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>
    Alexey Perevalov authored and dagrh committed Jun 29, 2017
    Copy the full SHA
    02591ad View commit details
    Browse the repository at this point in the history
  34. 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>
    juanquintela authored and dagrh committed Jun 29, 2017
    Copy the full SHA
    473baef View commit details
    Browse the repository at this point in the history
  35. 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>
    juanquintela authored and dagrh committed Jun 29, 2017
    Copy the full SHA
    d9121c5 View commit details
    Browse the repository at this point in the history
Older