1. 06 3月, 2019 2 次提交
  2. 23 1月, 2019 1 次提交
  3. 26 9月, 2018 1 次提交
  4. 22 8月, 2018 8 次提交
  5. 15 6月, 2018 1 次提交
  6. 04 6月, 2018 2 次提交
    • 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
  7. 16 5月, 2018 1 次提交
  8. 06 2月, 2018 1 次提交
  9. 16 1月, 2018 1 次提交
    • E
      maint: Fix macros with broken 'do/while(0); ' usage · 2562755e
      Eric Blake 提交于
      The point of writing a macro embedded in a 'do { ... } while (0)'
      loop (particularly if the macro has multiple statements or would
      otherwise end with an 'if' statement) is so that the macro can be
      used as a drop-in statement with the caller supplying the
      trailing ';'.  Although our coding style frowns on brace-less 'if':
        if (cond)
          statement;
        else
          something else;
      that is the classic case where failure to use do/while(0) wrapping
      would cause the 'else' to pair with any embedded 'if' in the macro
      rather than the intended outer 'if'.  But conversely, if the macro
      includes an embedded ';', then the same brace-less coding style
      would now have two statements, making the 'else' a syntax error
      rather than pairing with the outer 'if'.  Thus, even though our
      coding style with required braces is not impacted, ending a macro
      with ';' makes our code harder to port to projects that use
      brace-less styles.
      
      The change should have no semantic impact.  I was not able to
      fully compile-test all of the changes (as some of them are
      examples of the ugly bit-rotting debug print statements that are
      completely elided by default, and I didn't want to recompile
      with the necessary -D witnesses - cleaning those up is left as a
      bite-sized task for another day); I did, however, audit that for
      all files touched, all callers of the changed macros DID supply
      a trailing ';' at the callsite, and did not appear to be used
      as part of a brace-less conditional.
      
      Found mechanically via: $ git grep -B1 'while (0);' | grep -A1 \\\\
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Acked-by: NCornelia Huck <cohuck@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Acked-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Message-Id: <20171201232433.25193-7-eblake@redhat.com>
      Reviewed-by: NJuan Quintela <quintela@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      2562755e
  10. 18 7月, 2017 5 次提交
  11. 13 6月, 2017 1 次提交
  12. 02 6月, 2017 3 次提交
  13. 19 5月, 2017 1 次提交
  14. 09 5月, 2017 1 次提交
  15. 24 4月, 2017 1 次提交
  16. 13 10月, 2016 2 次提交
  17. 14 9月, 2016 1 次提交
  18. 16 6月, 2016 1 次提交
    • D
      migration: rename functions to starting migrations · 22724f49
      Daniel P. Berrange 提交于
      Apply the following renames for starting incoming migration:
      
       process_incoming_migration -> migration_fd_process_incoming
       migration_set_incoming_channel -> migration_channel_process_incoming
       migration_tls_set_incoming_channel -> migration_tls_channel_process_incoming
      
      and for starting outgoing migration:
      
       migration_set_outgoing_channel -> migration_channel_connect
       migration_tls_set_outgoing_channel -> migration_tls_channel_connect
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-id: 1464776234-9910-3-git-send-email-berrange@redhat.com
      Message-Id: <1464776234-9910-3-git-send-email-berrange@redhat.com>
      Signed-off-by: NAmit Shah <amit.shah@redhat.com>
      22724f49
  19. 26 5月, 2016 3 次提交
    • D
      migration: convert RDMA to use QIOChannel interface · 6ddd2d76
      Daniel P. Berrange 提交于
      This converts the RDMA code to provide a subclass of QIOChannel
      that uses RDMA for the data transport.
      
      This implementation of RDMA does not correctly handle non-blocking
      mode. Reads might block if there was not already some pending data
      and writes will block until all data is sent. This flawed behaviour
      was already present in the existing impl, so appears to not be a
      critical problem at this time. It should be on the list of things
      to fix in the future though.
      
      The RDMA code would be much better off it it could be split up in
      a generic RDMA layer, a QIOChannel impl based on RMDA, and then
      the RMDA migration glue. This is left as a future exercise for
      the brave.
      Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-Id: <1461751518-12128-18-git-send-email-berrange@redhat.com>
      Signed-off-by: NAmit Shah <amit.shah@redhat.com>
      6ddd2d76
    • D
      migration: add reporting of errors for outgoing migration · d59ce6f3
      Daniel P. Berrange 提交于
      Currently if an application initiates an outgoing migration,
      it may or may not, get an error reported back on failure. If
      the error occurs synchronously to the 'migrate' command
      execution, the client app will see the error message. This
      is the case for DNS lookup failures. If the error occurs
      asynchronously to the monitor command though, the error
      will be thrown away and the client left guessing about
      what went wrong. This is the case for failure to connect
      to the TCP server (eg due to wrong port, or firewall
      rules, or other similar errors).
      
      In the future we'll be adding more scope for errors to
      happen asynchronously with the TLS protocol handshake.
      TLS errors are hard to diagnose even when they are well
      reported, so discarding errors entirely will make it
      impossible to debug TLS connection problems.
      
      Management apps which do migration are already using
      'query-migrate' / 'info migrate' to check up on progress
      of background migration operations and to see their end
      status. This is a fine place to also include the error
      message when things go wrong.
      
      This patch thus adds an 'error-desc' field to the
      MigrationInfo struct, which will be populated when
      the 'status' is set to 'failed':
      
      (qemu) migrate -d tcp:localhost:9001
      (qemu) info migrate
      capabilities: xbzrle: off rdma-pin-all: off auto-converge: off zero-blocks: off compress: off events: off x-postcopy-ram: off
      Migration status: failed (Error connecting to socket: Connection refused)
      total time: 0 milliseconds
      
      In the HMP, when doing non-detached migration, it is
      also possible to display this error message directly
      to the app.
      
      (qemu) migrate tcp:localhost:9001
      Error connecting to socket: Connection refused
      
      Or with QMP
      
        {
          "execute": "query-migrate",
          "arguments": {}
        }
        {
          "return": {
            "status": "failed",
            "error-desc": "address resolution failed for myhost:9000: No address associated with hostname"
          }
        }
      Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Reviewed-by: NJuan Quintela <quintela@redhat.com>
      Message-Id: <1461751518-12128-11-git-send-email-berrange@redhat.com>
      Signed-off-by: NAmit Shah <amit.shah@redhat.com>
      d59ce6f3
    • D
      migration: split migration hooks out of QEMUFileOps · 0436e09f
      Daniel P. Berrange 提交于
      The QEMUFileOps struct contains the I/O subsystem callbacks
      and the migration stage hooks. Split the hooks out into a
      separate QEMUFileHooks struct to make it easier to refactor
      the I/O side of QEMUFile without affecting the hooks.
      Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Reviewed-by: NJuan Quintela <quintela@redhat.com>
      Message-Id: <1461751518-12128-6-git-send-email-berrange@redhat.com>
      Signed-off-by: NAmit Shah <amit.shah@redhat.com>
      0436e09f
  20. 23 3月, 2016 2 次提交
    • V
      util: move declarations out of qemu-common.h · f348b6d1
      Veronia Bahaa 提交于
      Move declarations out of qemu-common.h for functions declared in
      utils/ files: e.g. include/qemu/path.h for utils/path.c.
      Move inline functions out of qemu-common.h and into new files (e.g.
      include/qemu/bcd.h)
      Signed-off-by: NVeronia Bahaa <veroniabahaa@gmail.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      f348b6d1
    • M
      include/qemu/osdep.h: Don't include qapi/error.h · da34e65c
      Markus Armbruster 提交于
      Commit 57cb38b3 included qapi/error.h into qemu/osdep.h to get the
      Error typedef.  Since then, we've moved to include qemu/osdep.h
      everywhere.  Its file comment explains: "To avoid getting into
      possible circular include dependencies, this file should not include
      any other QEMU headers, with the exceptions of config-host.h,
      compiler.h, os-posix.h and os-win32.h, all of which are doing a
      similar job to this file and are under similar constraints."
      qapi/error.h doesn't do a similar job, and it doesn't adhere to
      similar constraints: it includes qapi-types.h.  That's in excess of
      100KiB of crap most .c files don't actually need.
      
      Add the typedef to qemu/typedefs.h, and include that instead of
      qapi/error.h.  Include qapi/error.h in .c files that need it and don't
      get it now.  Include qapi-types.h in qom/object.h for uint16List.
      
      Update scripts/clean-includes accordingly.  Update it further to match
      reality: replace config.h by config-target.h, add sysemu/os-posix.h,
      sysemu/os-win32.h.  Update the list of includes in the qemu/osdep.h
      comment quoted above similarly.
      
      This reduces the number of objects depending on qapi/error.h from "all
      of them" to less than a third.  Unfortunately, the number depending on
      qapi-types.h shrinks only a little.  More work is needed for that one.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      [Fix compilation without the spice devel packages. - Paolo]
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      da34e65c
  21. 05 2月, 2016 1 次提交