1. 26 3月, 2019 1 次提交
  2. 06 3月, 2019 5 次提交
  3. 23 1月, 2019 3 次提交
  4. 11 1月, 2019 1 次提交
    • P
      qemu/queue.h: leave head structs anonymous unless necessary · b58deb34
      Paolo Bonzini 提交于
      Most list head structs need not be given a name.  In most cases the
      name is given just in case one is going to use QTAILQ_LAST, QTAILQ_PREV
      or reverse iteration, but this does not apply to lists of other kinds,
      and even for QTAILQ in practice this is only rarely needed.  In addition,
      we will soon reimplement those macros completely so that they do not
      need a name for the head struct.  So clean up everything, not giving a
      name except in the rare case where it is necessary.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      b58deb34
  5. 19 10月, 2018 4 次提交
  6. 27 9月, 2018 2 次提交
    • P
      migration/ram.c: Avoid taking address of fields in packed MultiFDInit_t struct · 341ba0df
      Peter Maydell 提交于
      Taking the address of a field in a packed struct is a bad idea, because
      it might not be actually aligned enough for that pointer type (and
      thus cause a crash on dereference on some host architectures). Newer
      versions of clang warn about this:
      
      migration/ram.c:651:19: warning: taking address of packed member 'magic' of class or structure 'MultiFDInit_t' may result in an unaligned pointer value [-Waddress-of-packed-member]
      migration/ram.c:652:19: warning: taking address of packed member 'version' of class or structure 'MultiFDInit_t' may result in an unaligned pointer value [-Waddress-of-packed-member]
      migration/ram.c:737:19: warning: taking address of packed member 'magic' of class or structure 'MultiFDPacket_t' may result in an unaligned pointer value [-Waddress-of-packed-member]
      migration/ram.c:745:19: warning: taking address of packed member 'version' of class or structure 'MultiFDPacket_t' may result in an unaligned pointer value [-Waddress-of-packed-member]
      migration/ram.c:755:19: warning: taking address of packed member 'size' of class or structure 'MultiFDPacket_t' may result in an unaligned pointer value [-Waddress-of-packed-member]
      
      Avoid the bug by not using the "modify in place" byteswapping
      functions.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-Id: <20180925161924.7832-1-peter.maydell@linaro.org>
      Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      341ba0df
    • F
      migration: fix the compression code · 05306935
      Fei Li 提交于
      Add judgement in compress_threads_save_cleanup() to check whether the
      static CompressParam *comp_param has been allocated. If not, just
      return; or else segmentation fault will occur when using the NULL
      comp_param's parameters.  One test case can reproduce this is: set
      the compression on and migrate to a wrong nonexistent host IP address.
      
      Our current code does not judge before handling comp_param[idx]'s quit
      and cond that whether they have been initialized. If not initialized,
      "qemu_mutex_lock_impl: Assertion `mutex->initialized' failed." will
      occur. Fix this by squashing the terminate_compression_threads() into
      compress_threads_save_cleanup() and employing the existing judgement
      condition.  One test case can reproduce this error is: set the
      compression on and fail to fully setup the default eight compression
      thread in compress_threads_save_setup().
      Signed-off-by: NFei Li <fli@suse.com>
      Message-Id: <20180925091440.18910-1-fli@suse.com>
      Reviewed-by: NPeter Xu <peterx@redhat.com>
      Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      05306935
  7. 26 9月, 2018 5 次提交
  8. 29 8月, 2018 1 次提交
  9. 22 8月, 2018 8 次提交
  10. 10 8月, 2018 2 次提交
  11. 25 7月, 2018 1 次提交
  12. 24 7月, 2018 1 次提交
    • P
      migration: fix potential overflow in multifd send · 4fcefd44
      Peter Xu 提交于
      I would guess it won't happen normally, but this should ease Coverity.
      
      >>>     CID 1394385:  Integer handling issues  (OVERFLOW_BEFORE_WIDEN)
      >>>     Potentially overflowing expression "pages->used * 8192U" with type "unsigned int" (32 bits, unsigned) is evaluated using 32-bit arithmetic, and then used in a context that expects an expression of type "uint64_t" (64 bits, unsigned).
      854         transferred = pages->used * TARGET_PAGE_SIZE + p->packet_len;
      
      Fixes: CID 1394385
      CC: Juan Quintela <quintela@redhat.com>
      Signed-off-by: NPeter Xu <peterx@redhat.com>
      Message-Id: <20180720034713.11711-1-peterx@redhat.com>
      Reviewed-by: NJuan Quintela <quintela@redhat.com>
      Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      4fcefd44
  13. 10 7月, 2018 3 次提交
  14. 27 6月, 2018 3 次提交