1. 25 9月, 2010 1 次提交
    • A
      Introduce qemu_madvise() · e78815a5
      Andreas Färber 提交于
      vl.c has a Sun-specific hack to supply a prototype for madvise(),
      but the call site has apparently moved to arch_init.c.
      
      Haiku doesn't implement madvise() in favor of posix_madvise().
      OpenBSD and Solaris 10 don't implement posix_madvise() but madvise().
      MinGW implements neither.
      
      Check for madvise() and posix_madvise() in configure and supply qemu_madvise()
      as wrapper. Prefer madvise() over posix_madvise() due to flag availability.
      Convert all callers to use qemu_madvise() and QEMU_MADV_*.
      
      Note that on Solaris the warning is fixed by moving the madvise() prototype,
      not by qemu_madvise() itself. It helps with porting though, and it simplifies
      most call sites.
      
      v7 -> v8:
      * Some versions of MinGW have no sys/mman.h header. Reported by Blue Swirl.
      
      v6 -> v7:
      * Adopt madvise() rather than posix_madvise() semantics for returning errors.
      * Use EINVAL in place of ENOTSUP.
      
      v5 -> v6:
      * Replace two leftover instances of POSIX_MADV_NORMAL with QEMU_MADV_INVALID.
        Spotted by Blue Swirl.
      
      v4 -> v5:
      * Introduce QEMU_MADV_INVALID, suggested by Alexander Graf.
        Note that this relies on -1 not being a valid advice value.
      
      v3 -> v4:
      * Eliminate #ifdefs at qemu_advise() call sites. Requested by Blue Swirl.
        This will currently break the check in kvm-all.c by calling madvise() with
        a supported flag, which will not fail. Ideas/patches welcome.
      
      v2 -> v3:
      * Reuse the *_MADV_* defines for QEMU_MADV_*. Suggested by Alexander Graf.
      * Add configure check for madvise(), too.
        Add defines to Makefile, not QEMU_CFLAGS.
        Convert all callers, untested. Suggested by Blue Swirl.
      * Keep Solaris' madvise() prototype around. Pointed out by Alexander Graf.
      * Display configure check results.
      
      v1 -> v2:
      * Don't rely on posix_madvise() availability, add qemu_madvise().
        Suggested by Blue Swirl.
      Signed-off-by: NAndreas Färber <afaerber@opensolaris.org>
      Cc: Blue Swirl <blauwirbel@gmail.com>
      Cc: Alexander Graf <agraf@suse.de>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      e78815a5
  2. 10 9月, 2010 1 次提交
  3. 28 6月, 2010 1 次提交
    • S
      win32: Add missing function ffs · 4972d592
      Stefan Weil 提交于
      mingw32 does not include function ffs.
      
      Commit c6d29ad6 added a
      declaration for ffs, but an implementation was missing.
      
      For compilations with optimization, the compiler creates
      inline code, so the implementation is not always needed.
      
      Without optimization, linking fails without this patch.
      
      v2: Use __builtin_ffs as suggested by Richard Henderson
      
      Cc: Richard Henderson <rth@twiddle.net>
      Signed-off-by: NStefan Weil <weil@mail.berlios.de>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      4972d592
  4. 10 3月, 2010 1 次提交
  5. 24 2月, 2010 1 次提交
  6. 17 2月, 2010 1 次提交
  7. 11 2月, 2010 1 次提交
  8. 27 1月, 2010 2 次提交
  9. 14 1月, 2010 1 次提交
  10. 19 12月, 2009 1 次提交
  11. 18 12月, 2009 1 次提交
    • A
      osdep: Fix runtime failure on older Linux kernels · 3a03bfa5
      Andre Przywara 提交于
      If QEMU finds newer kernel header files on compilation time, it will use
      advertised features like pipe2 or SOCK_CLOEXEC by just doing a compile test.
      If later the executables are executed on an older kernel (<2.6.27,
      like Xen Dom0 2.6.18), then QEMU will fail on opening sockets and creating
      pipes and returns the rather unspecific "qemu_init_main_loop failed".
      This patch fixes this by checking the return values of these calls
      for EINVAL and ENOSYS and falling back to the older versions automatically.
      Signed-off-by: NAndre Przywara <andre.przywara@amd.com>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      3a03bfa5
  12. 04 12月, 2009 1 次提交
  13. 12 9月, 2009 1 次提交
  14. 24 8月, 2009 2 次提交
    • A
      Only build osdep once · a25a0ef5
      Anthony Liguori 提交于
      We no longer need hackery to work around kqemu
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      a25a0ef5
    • A
      Unbreak large mem support by removing kqemu · 4a1418e0
      Anthony Liguori 提交于
      kqemu introduces a number of restrictions on the i386 target.  The worst is that
      it prevents large memory from working in the default build.
      
      Furthermore, kqemu is fundamentally flawed in a number of ways.  It relies on
      the TSC as a time source which will not be reliable on a multiple processor
      system in userspace.  Since most modern processors are multicore, this severely
      limits the utility of kqemu.
      
      kvm is a viable alternative for people looking to accelerate qemu and has the
      benefit of being supported by the upstream Linux kernel.  If someone can
      implement work arounds to remove the restrictions introduced by kqemu, I'm
      happy to avoid and/or revert this patch.
      
      N.B. kqemu will still function in the 0.11 series but this patch removes it from
      the 0.12 series.
      
      Paul, please Ack or Nack this patch.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      4a1418e0
  15. 28 7月, 2009 2 次提交
  16. 08 7月, 2009 1 次提交
  17. 14 5月, 2009 1 次提交
    • P
      Add tool_osdep.c · 88ca2a59
      Paul Brook 提交于
      osdep.c is built in both as a toplevel target independant object, and
      as a per-target object because of kqemu dependencies.  Under some
      circumstances make picks up the wrong one.
      
      Build the former as tool-osdep to avoid this conflict.
      Signed-off-by: NPaul Brook <paul@codesourcery.com>
      88ca2a59
  18. 19 4月, 2009 1 次提交
  19. 09 3月, 2009 1 次提交
  20. 08 3月, 2009 3 次提交
  21. 07 3月, 2009 1 次提交
  22. 12 12月, 2008 1 次提交
  23. 23 11月, 2008 1 次提交
  24. 18 11月, 2008 1 次提交
  25. 12 11月, 2008 3 次提交
  26. 15 9月, 2008 1 次提交
    • A
      Use common objects for qemu-img and qemu-nbd · 03ff3ca3
      aliguori 提交于
      Right now, we sprinkle #if defined(QEMU_IMG) && defined(QEMU_NBD) all over the
      code.  It's ugly and causes us to have to build multiple object files for
      linking against qemu and the tools.
      
      This patch introduces a new file, qemu-tool.c which contains enough for
      qemu-img, qemu-nbd, and QEMU to all share the same objects.
      
      This also required getting qemu-nbd to be a bit more Windows friendly.  I also
      changed the Windows block-raw to use normal IO instead of overlapping IO since
      we don't actually do AIO yet on Windows.  I changed the various #if 0's to
       #if WIN32_AIO to make it easier for someone to eventually fix AIO on Windows.
      
      After this patch, there are no longer any #ifdef's related to qemu-img and
      qemu-nbd.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5226 c046a42c-6fe2-441c-8c8c-71466251a162
      03ff3ca3
  27. 16 8月, 2008 1 次提交
  28. 28 4月, 2008 1 次提交
  29. 23 4月, 2008 2 次提交
  30. 21 4月, 2008 1 次提交
  31. 12 4月, 2008 1 次提交
  32. 24 12月, 2007 1 次提交