Skip to content
  • Jianjun Duan's avatar
    94869d5c
    migration: migrate QTAILQ · 94869d5c
    Jianjun Duan authored
    
    
    Currently we cannot directly transfer a QTAILQ instance because of the
    limitation in the migration code. Here we introduce an approach to
    transfer such structures. We created VMStateInfo vmstate_info_qtailq
    for QTAILQ. Similar VMStateInfo can be created for other data structures
    such as list.
    
    When a QTAILQ is migrated from source to target, it is appended to the
    corresponding QTAILQ structure, which is assumed to have been properly
    initialized.
    
    This approach will be used to transfer pending_events and ccs_list in spapr
    state.
    
    We also create some macros in qemu/queue.h to access a QTAILQ using pointer
    arithmetic. This ensures that we do not depend on the implementation
    details about QTAILQ in the migration code.
    
    Reviewed-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
    
    Signed-off-by: default avatarJianjun Duan <duanj@linux.vnet.ibm.com>
    Message-Id: <1484852453-12728-3-git-send-email-duanj@linux.vnet.ibm.com>
    Signed-off-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
    94869d5c
    migration: migrate QTAILQ
    Jianjun Duan authored
    
    
    Currently we cannot directly transfer a QTAILQ instance because of the
    limitation in the migration code. Here we introduce an approach to
    transfer such structures. We created VMStateInfo vmstate_info_qtailq
    for QTAILQ. Similar VMStateInfo can be created for other data structures
    such as list.
    
    When a QTAILQ is migrated from source to target, it is appended to the
    corresponding QTAILQ structure, which is assumed to have been properly
    initialized.
    
    This approach will be used to transfer pending_events and ccs_list in spapr
    state.
    
    We also create some macros in qemu/queue.h to access a QTAILQ using pointer
    arithmetic. This ensures that we do not depend on the implementation
    details about QTAILQ in the migration code.
    
    Reviewed-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
    
    Signed-off-by: default avatarJianjun Duan <duanj@linux.vnet.ibm.com>
    Message-Id: <1484852453-12728-3-git-send-email-duanj@linux.vnet.ibm.com>
    Signed-off-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
Loading