1. 02 Nov, 2014 1 commit
  2. 15 Aug, 2014 1 commit
  3. 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
  4. 19 Jun, 2014 1 commit
  5. 13 Mar, 2014 1 commit
  6. 20 Feb, 2014 1 commit
  7. 24 Jan, 2014 1 commit
  8. 22 Jan, 2014 1 commit
  9. 02 Oct, 2013 1 commit
    • Sebastian Ottlik's avatar
      util: add socket_set_fast_reuse function which will replace setting SO_REUSEADDR · 606600a1
      Sebastian Ottlik authored
      If a socket is closed it remains in TIME_WAIT state for some time. On operating
      systems using BSD sockets the endpoint of the socket may not be reused while in
      this state unless SO_REUSEADDR was set on the socket. On windows on the other
      hand the default behaviour is to allow reuse (i.e. identical to SO_REUSEADDR on
      other operating systems) and setting SO_REUSEADDR on a socket allows it to be
      bound to a endpoint even if the endpoint is already used by another socket
      independently of the other sockets state. This can even result in undefined
      behaviour.
      
      Many sockets used by QEMU should not block the use of their endpoint after being
      closed while they are still in TIME_WAIT state. Currently QEMU sets SO_REUSEADDR
      for such sockets, which can lead to problems on Windows. This patch introduces
      the function socket_set_fast_reuse that should be used instead of setting
      SO_REUSEADDR when fast socket reuse is desired and behaves correctly on all
      operating systems.
      
      As a failure of this function can only be caused by bad QEMU internal errors, an
      assertion handles these situations. The return value is still passed on, to
      minimize changes in client code and prevent unused variable warnings if NDEBUG
      is defined.
      Signed-off-by: default avatarSebastian Ottlik <ottlik@fzi.de>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Signed-off-by: default avatarStefan Weil <sw@weilnetz.de>
      606600a1
  10. 12 Sep, 2013 1 commit
  11. 30 May, 2013 1 commit
  12. 14 May, 2013 2 commits
  13. 16 Apr, 2013 1 commit
    • Paolo Bonzini's avatar
      migration: initialize RAM to zero · 7dda5dc8
      Paolo Bonzini authored
      Using qemu_memalign only leaves the RAM zero by chance, because libc
      will usually use mmap to satisfy our huge requests.  But memory will
      not be zero when using MALLOC_PERTURB_ with a nonzero value.  In the
      case of incoming migration, this breaks a recently-introduced
      invariant (commit f1c72795, migration: do not sent zero pages in
      bulk stage, 2013-03-26).
      
      To fix this, use mmap ourselves to get a well-aligned, always zero
      block for the RAM.  Mmap-ed memory is easy to "trim" at the sides.
      
      This also removes the need to do something special on valgrind
      (see commit c2a8238a, Support running QEMU on Valgrind, 2011-10-31),
      thus effectively reverts that patch.
      Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-id: 1365522223-20153-1-git-send-email-pbonzini@redhat.com
      Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
      7dda5dc8
  14. 02 Apr, 2013 1 commit
  15. 04 Mar, 2013 1 commit
  16. 26 Jan, 2013 1 commit
  17. 12 Jan, 2013 1 commit
  18. 19 Dec, 2012 2 commits
  19. 30 Oct, 2012 1 commit
  20. 10 Jul, 2012 1 commit
  21. 28 Jun, 2012 1 commit
  22. 22 Dec, 2011 1 commit
  23. 28 Nov, 2011 1 commit
  24. 01 Nov, 2011 1 commit
    • Stefan Weil's avatar
      Support running QEMU on Valgrind · c2a8238a
      Stefan Weil authored
      Valgrind is a tool which can automatically detect many kinds of bugs.
      
      Running QEMU on Valgrind with x86_64 hosts was not possible because
      Valgrind aborts when memalign is called with an alignment larger than
      1 MiB. QEMU normally uses 2 MiB on Linux x86_64.
      
      Now the alignment is reduced to the page size when QEMU is running on
      Valgrind.
      
      v2:
      Instead of using the macro RUNNING_ON_VALGRIND from valgrind.h,
      the patch now uses a hack from libvirt which tests for the pre-loaded
      vgpreload_*.so shared libraries. This avoids the need for valgrind.h.
      Signed-off-by: default avatarStefan Weil <sw@weilnetz.de>
      Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
      c2a8238a
  25. 21 Oct, 2011 1 commit
  26. 09 Sep, 2011 1 commit
  27. 29 Jul, 2011 1 commit
  28. 13 Jun, 2011 1 commit
  29. 02 Dec, 2010 1 commit
    • Hidetoshi Seto's avatar
      virtio-9p: fix build on !CONFIG_UTIMENSAT · 38671423
      Hidetoshi Seto authored
      This patch introduce a fallback mechanism for old systems that do not
      support utimensat().  This fix build failure with following warnings:
      
      hw/virtio-9p-local.c: In function 'local_utimensat':
      hw/virtio-9p-local.c:479: warning: implicit declaration of function 'utimensat'
      hw/virtio-9p-local.c:479: warning: nested extern declaration of 'utimensat'
      
      and:
      
      hw/virtio-9p.c: In function 'v9fs_setattr_post_chmod':
      hw/virtio-9p.c:1410: error: 'UTIME_NOW' undeclared (first use in this function)
      hw/virtio-9p.c:1410: error: (Each undeclared identifier is reported only once
      hw/virtio-9p.c:1410: error: for each function it appears in.)
      hw/virtio-9p.c:1413: error: 'UTIME_OMIT' undeclared (first use in this function)
      hw/virtio-9p.c: In function 'v9fs_wstat_post_chmod':
      hw/virtio-9p.c:2905: error: 'UTIME_OMIT' undeclared (first use in this function)
      
      [NOTE: At this time virtio-9p is only user of utimensat(), and is available
             only when host is linux and CONFIG_VIRTFS is defined.  So there are
             no similar warning for win32.  Please provide a wrapper for win32 in
             oslib-win32.c if new user really requires it.]
      
      v5:
        - Allow fallback on runtime
        - Move qemu_utimensat() to oslib-posix.c
        - Rebased on latest qemu.git
      v4:
        - Use tv_now.tv_usec
      v3:
        - Use better alternative handling for UTIME_NOW/OMIT
        - Move qemu_utimensat() to cutils.c
      V2:
        - Introduce qemu_utimensat()
      Acked-by: default avatarChris Wright <chrisw@sous-sol.org>
      Acked-by: default avatarM. Mohan Kumar <mohan@in.ibm.com>
      Acked-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
      Signed-off-by: default avatarHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
      Signed-off-by: default avatarVenkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
      38671423
  30. 30 Oct, 2010 4 commits
  31. 23 Oct, 2010 1 commit
    • Blue Swirl's avatar
      qemu-timer: move commonly used timer code to qemu-timer-common · c57c846a
      Blue Swirl authored
      Move timer init functions to a new file, qemu-timer-common.c. Make other
      critical timer functions inlined to preserve performance in
      qemu-timer.c, also move muldiv64() (used by the inline functions)
      to qemu-timer.h.
      
      Adjust block/raw-posix.c and simpletrace.c to use get_clock() directly.
      Remove a similar/duplicate definition in qemu-tool.c.
      
      Adjust hw/omap_clk.c to include qemu-timer.h because muldiv64() is used
      there.
      
      After this change, tracing can be used also for user code and
      simpletrace on Win32.
      
      Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Acked-by: default avatarStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Signed-off-by: default avatarBlue Swirl <blauwirbel@gmail.com>
      c57c846a
  32. 03 Dec, 2009 1 commit
  33. 30 Oct, 2009 3 commits