1. 04 6月, 2018 5 次提交
    • L
      migration: not wait RDMA_CM_EVENT_DISCONNECTED event after rdma_disconnect · c5e76115
      Lidong Chen 提交于
      When cancel migration during RDMA precopy, the source qemu main thread hangs sometime.
      
      The backtrace is:
          (gdb) bt
          #0  0x00007f249eabd43d in write () from /lib64/libpthread.so.0
          #1  0x00007f24a1ce98e4 in rdma_get_cm_event (channel=0x4675d10, event=0x7ffe2f643dd0) at src/cma.c:2189
          #2  0x00000000007b6166 in qemu_rdma_cleanup (rdma=0x6784000) at migration/rdma.c:2296
          #3  0x00000000007b7cae in qio_channel_rdma_close (ioc=0x3bfcc30, errp=0x0) at migration/rdma.c:2999
          #4  0x00000000008db60e in qio_channel_close (ioc=0x3bfcc30, errp=0x0) at io/channel.c:273
          #5  0x00000000007a8765 in channel_close (opaque=0x3bfcc30) at migration/qemu-file-channel.c:98
          #6  0x00000000007a71f9 in qemu_fclose (f=0x527c000) at migration/qemu-file.c:334
          #7  0x0000000000795b96 in migrate_fd_cleanup (opaque=0x3b46280) at migration/migration.c:1162
          #8  0x000000000093a71b in aio_bh_call (bh=0x3db7a20) at util/async.c:90
          #9  0x000000000093a7b2 in aio_bh_poll (ctx=0x3b121c0) at util/async.c:118
          #10 0x000000000093f2ad in aio_dispatch (ctx=0x3b121c0) at util/aio-posix.c:436
          #11 0x000000000093ab41 in aio_ctx_dispatch (source=0x3b121c0, callback=0x0, user_data=0x0)
              at util/async.c:261
          #12 0x00007f249f73c7aa in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
          #13 0x000000000093dc5e in glib_pollfds_poll () at util/main-loop.c:215
          #14 0x000000000093dd4e in os_host_main_loop_wait (timeout=28000000) at util/main-loop.c:263
          #15 0x000000000093de05 in main_loop_wait (nonblocking=0) at util/main-loop.c:522
          #16 0x00000000005bc6a5 in main_loop () at vl.c:1944
          #17 0x00000000005c39b5 in main (argc=56, argv=0x7ffe2f6443f8, envp=0x3ad0030) at vl.c:4752
      
      It does not get the RDMA_CM_EVENT_DISCONNECTED event after rdma_disconnect sometime.
      
      According to IB Spec once active side send DREQ message, it should wait for DREP message
      and only once it arrived it should trigger a DISCONNECT event. DREP message can be dropped
      due to network issues.
      For that case the spec defines a DREP_timeout state in the CM state machine, if the DREP is
      dropped we should get a timeout and a TIMEWAIT_EXIT event will be trigger.
      Unfortunately the current kernel CM implementation doesn't include the DREP_timeout state
      and in above scenario we will not get DISCONNECT or TIMEWAIT_EXIT events.
      
      So it should not invoke rdma_get_cm_event which may hang forever, and the event channel
      is also destroyed in qemu_rdma_cleanup.
      Signed-off-by: NLidong Chen <lidongchen@tencent.com>
      Reviewed-by: NJuan Quintela <quintela@redhat.com>
      Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Signed-off-by: NJuan Quintela <quintela@redhat.com>
      c5e76115
    • L
      migration: remove unnecessary variables len in QIOChannelRDMA · f38f6d41
      Lidong Chen 提交于
      Because qio_channel_rdma_writev and qio_channel_rdma_readv maybe invoked
      by different threads concurrently, this patch removes unnecessary variables
      len in QIOChannelRDMA and use local variable instead.
      Signed-off-by: NLidong Chen <lidongchen@tencent.com>
      Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      Reviewed-by: NJuan Quintela <quintela@redhat.com>
      Signed-off-by: NJuan Quintela <quintela@redhat.com>
      Signed-off-by: NLidong Chen <jemmy858585@gmail.com>
      f38f6d41
    • D
      migration: Don't activate block devices if using -S · 0f073f44
      Dr. David Alan Gilbert 提交于
      Activating the block devices causes the locks to be taken on
      the backing file.  If we're running with -S and the destination libvirt
      hasn't started the destination with 'cont', it's expecting the locks are
      still untaken.
      
      Don't activate the block devices if we're not going to autostart the VM;
      'cont' already will do that anyway.   This change is tied to the new
      migration capability 'late-block-activate' that defaults to off, keeping
      the old behaviour by default.
      
      bz: https://bugzilla.redhat.com/show_bug.cgi?id=1560854Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Reviewed-by: NJuan Quintela <quintela@redhat.com>
      Signed-off-by: NJuan Quintela <quintela@redhat.com>
      0f073f44
    • C
      migration: discard non-migratable RAMBlocks · b895de50
      Cédric Le Goater 提交于
      On the POWER9 processor, the XIVE interrupt controller can control
      interrupt sources using MMIO to trigger events, to EOI or to turn off
      the sources. Priority management and interrupt acknowledgment is also
      controlled by MMIO in the presenter sub-engine.
      
      These MMIO regions are exposed to guests in QEMU with a set of 'ram
      device' memory mappings, similarly to VFIO, and the VMAs are populated
      dynamically with the appropriate pages using a fault handler.
      
      But, these regions are an issue for migration. We need to discard the
      associated RAMBlocks from the RAM state on the source VM and let the
      destination VM rebuild the memory mappings on the new host in the
      post_load() operation just before resuming the system.
      
      To achieve this goal, the following introduces a new RAMBlock flag
      RAM_MIGRATABLE which is updated in the vmstate_register_ram() and
      vmstate_unregister_ram() routines. This flag is then used by the
      migration to identify RAMBlocks to discard on the source. Some checks
      are also performed on the destination to make sure nothing invalid was
      sent.
      
      This change impacts the boston, malta and jazz mips boards for which
      migration compatibility is broken.
      Signed-off-by: NCédric Le Goater <clg@kaod.org>
      Reviewed-by: NJuan Quintela <quintela@redhat.com>
      Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Signed-off-by: NJuan Quintela <quintela@redhat.com>
      b895de50
    • X
      migration: introduce decompress-error-check · f548222c
      Xiao Guangrong 提交于
      QEMU 3.0 enables strict check for compression & decompression to
      make the migration more robust, that depends on the source to fix
      the internal design which triggers the unexpected error conditions
      
      To make it work for migrating old version QEMU to 2.13 QEMU, we
      introduce this parameter to disable the error check on the
      destination which is the default behavior of the machine type
      which is older than 2.13, alternately, the strict check can be
      enabled explicitly as followings:
            -M pc-q35-2.11 -global migration.decompress-error-check=true
      Signed-off-by: NXiao Guangrong <xiaoguangrong@tencent.com>
      Reviewed-by: NJuan Quintela <quintela@redhat.com>
      Signed-off-by: NJuan Quintela <quintela@redhat.com>
      f548222c
  2. 02 6月, 2018 1 次提交
    • P
      Merge remote-tracking branch 'remotes/stsquad/tags/pull-travis-updates-010618-1' into staging · 392fba9f
      Peter Maydell 提交于
      Some Travis & Docker updates
      
       - simplification of the build matrix
       - usability tweaks for docker
       - update Travis docker image
      
      # gpg: Signature made Fri 01 Jun 2018 15:05:03 BST
      # gpg:                using RSA key FBD0DB095A9E2A44
      # gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>"
      # Primary key fingerprint: 6685 AE99 E751 67BC AFC8  DF35 FBD0 DB09 5A9E 2A44
      
      * remotes/stsquad/tags/pull-travis-updates-010618-1:
        .travis.yml: update GCC sanitizer build to GCC 7
        .travis.yml: make current setup explicit
        .travis.yml: rationalise clang testing
        docker: update Travis docker image
        docker: do not display deprecated images in 'make docker' help
        docker: sort images list displayed by 'make docker'
        .travis.yml: disable linux-user build for gcov
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      392fba9f
  3. 01 6月, 2018 25 次提交
  4. 31 5月, 2018 9 次提交