1. 15 Aug, 2014 1 commit
  2. 18 Jul, 2014 2 commits
  3. 14 Jul, 2014 1 commit
    • Kevin Wolf's avatar
      dma-helpers: Fix too long qiov · 58f423fb
      Kevin Wolf authored
      If the size of the scatter/gather list isn't a multiple of 512, the
      number of sectors for the block layer request is rounded down, resulting
      in a qiov that doesn't match the request length. Truncate the qiov to the
      new length of the request.
      
      This fixes the IDE qtest case /x86_64/ide/bmdma/short_prdt.
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      58f423fb
  4. 10 Jul, 2014 1 commit
    • Stefan Weil's avatar
      oslib-posix: Fix new compiler error with -Wclobbered · b7bf8f56
      Stefan Weil authored
      Newer versions of gcc report a warning (or an error with -Werror) when
      compiler option -Wclobbered (or -Wextra) is active:
      
      util/oslib-posix.c:372:12: error:
       variable ‘hpagesize’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered]
      
      The rewritten code fixes this warning: variable 'hpagesize' is now set and
      used in a block without any call of sigsetjmp or similar functions.
      Signed-off-by: default avatarStefan Weil <sw@weilnetz.de>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      b7bf8f56
  5. 26 Jun, 2014 1 commit
    • Michal Privoznik's avatar
      qemu_opts_append: Play nicely with QemuOptsList's head · a7607150
      Michal Privoznik authored
      When running a libvirt test suite I've noticed the qemu-img is
      crashing occasionally. Tracing the problem down led me to the
      following valgrind output:
      
      qemu.git $ valgrind -q ./qemu-img create -f qed -obacking_file=/dev/null,backing_fmt=raw qed
      ==14881== Invalid write of size 8
      ==14881==    at 0x1D263F: qemu_opts_create (qemu-option.c:692)
      ==14881==    by 0x130782: bdrv_img_create (block.c:5531)
      ==14881==    by 0x118DE0: img_create (qemu-img.c:462)
      ==14881==    by 0x11E7E4: main (qemu-img.c:2830)
      ==14881==  Address 0x11fedd38 is 24 bytes inside a block of size 232 free'd
      ==14881==    at 0x4C2CA5E: realloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==14881==    by 0x592D35E: g_realloc (in /usr/lib64/libglib-2.0.so.0.3800.2)
      ==14881==    by 0x1D38D8: qemu_opts_append (qemu-option.c:1129)
      ==14881==    by 0x13075E: bdrv_img_create (block.c:5528)
      ==14881==    by 0x118DE0: img_create (qemu-img.c:462)
      ==14881==    by 0x11E7E4: main (qemu-img.c:2830)
      ==14881==
      Formatting 'qed', fmt=qed size=0 backing_file='/dev/null' backing_fmt='raw' cluster_size=65536
      ==14881== Invalid write of size 8
      ==14881==    at 0x1D28BE: qemu_opts_del (qemu-option.c:750)
      ==14881==    by 0x130BF3: bdrv_img_create (block.c:5638)
      ==14881==    by 0x118DE0: img_create (qemu-img.c:462)
      ==14881==    by 0x11E7E4: main (qemu-img.c:2830)
      ==14881==  Address 0x11fedd38 is 24 bytes inside a block of size 232 free'd
      ==14881==    at 0x4C2CA5E: realloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==14881==    by 0x592D35E: g_realloc (in /usr/lib64/libglib-2.0.so.0.3800.2)
      ==14881==    by 0x1D38D8: qemu_opts_append (qemu-option.c:1129)
      ==14881==    by 0x13075E: bdrv_img_create (block.c:5528)
      ==14881==    by 0x118DE0: img_create (qemu-img.c:462)
      ==14881==    by 0x11E7E4: main (qemu-img.c:2830)
      ==14881==
      
      The problem is apparently in the qemu_opts_append(). Well, if it
      gets called twice or more. On the first call, when @dst is NULL
      some initialization is done during which @dst->head list gets
      initialized. The list is initialized in a way, so that the list
      tail points at the list head. However, the next time
      qemu_opts_append() is called for new options to be added,
      g_realloc() may move @dst to a new address making the old list tail
      point at an invalid address. If that's the case, we must update the
      list pointers.
      Signed-off-by: default avatarMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      a7607150
  6. 23 Jun, 2014 4 commits
  7. 21 Jun, 2014 1 commit
  8. 19 Jun, 2014 2 commits
  9. 18 Jun, 2014 1 commit
  10. 16 Jun, 2014 17 commits
  11. 13 Jun, 2014 1 commit
  12. 11 Jun, 2014 2 commits
  13. 10 Jun, 2014 3 commits
  14. 04 Jun, 2014 1 commit
    • Stefan Hajnoczi's avatar
      throttle: add throttle_detach/attach_aio_context() · 13af91eb
      Stefan Hajnoczi authored
      Block I/O throttling uses timers and currently always adds them to the
      main loop.  Throttling will break if bdrv_set_aio_context() is used to
      move a BlockDriverState to a different AioContext.
      
      This patch adds throttle_detach/attach_aio_context() interfaces so the
      throttling timers and uses them to move timers to the new AioContext.
      Note that bdrv_set_aio_context() already drains all requests so we're
      sure no throttled requests are pending.
      
      The test cases need to be updated since the throttle_init() interface
      has changed.
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: default avatarBenoit Canet <benoit@irqsave.net>
      13af91eb
  15. 21 May, 2014 2 commits