1. 14 3月, 2017 2 次提交
  2. 03 3月, 2017 1 次提交
  3. 21 2月, 2017 1 次提交
  4. 02 11月, 2016 1 次提交
    • M
      main-loop: Suppress I/O thread warning under qtest · 7d175d29
      Max Reitz 提交于
      We do not want to display the "I/O thread spun" warning for test cases
      that run under qtest. The first attempt for this (commit
      01c22f2c) tested whether qtest_enabled()
      was true.
      
      Commit 21a24302 correctly recognized
      that just testing qtest_enabled() is not sufficient since there are some
      tests that do not use the qtest accelerator but just the qtest character
      device, and thus replaced qtest_enabled() by qtest_driver().
      
      However, there are also some tests that only use the qtest accelerator
      and not the qtest chardev; perhaps most notably the bash iotests.
      Therefore, we have to check both qtest_enabled() and qtest_driver().
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Message-Id: <20161017180939.27912-1-mreitz@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      7d175d29
  5. 27 10月, 2016 1 次提交
  6. 13 7月, 2016 1 次提交
  7. 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
  8. 16 3月, 2016 1 次提交
    • P
      icount: decouple warp calls · e76d1798
      Pavel Dovgalyuk 提交于
      qemu_clock_warp function is called to update virtual clock when CPU
      is sleeping. This function includes replay checkpoint to make execution
      deterministic in icount mode.
      Record/replay module flushes async event queue at checkpoints.
      Some of the events (e.g., block devices operations) include interaction
      with hardware. E.g., APIC polled by block devices sets one of IRQ flags.
      Flag to be set depends on currently executed thread (CPU or iothread).
      Therefore in replay mode we have to process the checkpoints in the same thread
      as they were recorded.
      qemu_clock_warp function (and its checkpoint) may be called from different
      thread. This patch decouples two different execution cases of this function:
      call when CPU is sleeping from iothread and call from cpu thread to update
      virtual clock.
      First task is performed by qemu_start_warp_timer function. It sets warp
      timer event to the moment of nearest pending virtual timer.
      Second function (qemu_account_warp_timer) is called from cpu thread
      before execution of the code. It advances virtual clock by adding the length
      of period while CPU was sleeping.
      Signed-off-by: NPavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
      Message-Id: <20160310115609.4812.44986.stgit@PASHA-ISP>
      [Update docs. - Paolo]
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      e76d1798
  9. 05 2月, 2016 1 次提交
    • P
      all: Clean up includes · d38ea87a
      Peter Maydell 提交于
      Clean up includes so that osdep.h is included first and headers
      which it implies are not included manually.
      
      This commit was created with scripts/clean-includes.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1454089805-5470-16-git-send-email-peter.maydell@linaro.org
      d38ea87a
  10. 02 12月, 2015 1 次提交
  11. 06 11月, 2015 1 次提交
  12. 08 9月, 2015 1 次提交
    • F
      iohandler: Use aio API · f3926945
      Fam Zheng 提交于
      iohandler.c shares the same interface with aio, but with duplicated
      code. It's better to rebase iohandler, also because that aio is a
      more friendly interface to multi-threads.
      
      Create a global AioContext instance and let its GSource handle the
      iohandler events.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Message-Id: <1441596538-4412-1-git-send-email-famz@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      f3926945
  13. 28 7月, 2015 1 次提交
  14. 12 6月, 2015 1 次提交
  15. 27 10月, 2014 1 次提交
  16. 26 9月, 2014 1 次提交
  17. 22 9月, 2014 1 次提交
    • C
      async: aio_context_new(): Handle event_notifier_init failure · 2f78e491
      Chrysostomos Nanakos 提交于
      On a system with a low limit of open files the initialization
      of the event notifier could fail and QEMU exits without printing any
      error information to the user.
      
      The problem can be easily reproduced by enforcing a low limit of open
      files and start QEMU with enough I/O threads to hit this limit.
      
      The same problem raises, without the creation of I/O threads, while
      QEMU initializes the main event loop by enforcing an even lower limit of
      open files.
      
      This commit adds an error message on failure:
      
       # qemu [...] -object iothread,id=iothread0 -object iothread,id=iothread1
       qemu: Failed to initialize event notifier: Too many open files in system
      Signed-off-by: NChrysostomos Nanakos <cnanakos@grnet.gr>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      2f78e491
  18. 09 7月, 2014 1 次提交
  19. 14 3月, 2014 1 次提交
  20. 17 9月, 2013 1 次提交
  21. 23 8月, 2013 3 次提交
  22. 19 8月, 2013 1 次提交
  23. 12 6月, 2013 1 次提交
    • M
      main-loop: do not include slirp/slirp.h, use libslirp.h instead · 520b6dd4
      Michael Tokarev 提交于
      The header slirp/slirp.h is an internal header for slirp, and
      main-loop.c does not use internals from there.  Instead, it uses
      public functions (slirp_update_timeout(), slirp_pollfds_fill()
      etc) which are declared in slirp/libslirp.h.
      
      Including slirp/slirp.h is somewhat dangerous since it redefines
      errno on WIN32, so any file including it may misbehave wrt errno.
      
      Unfortunately libslirp isn't self-contained, it needs declaration
      of struct in_addr, which is provided by qemu/sockets.h.  Maybe
      instead of #including qemu/sockets.h before libslirp.h, it is
      better to make the latter self-contained.
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      520b6dd4
  24. 17 5月, 2013 2 次提交
  25. 06 4月, 2013 1 次提交
    • A
      main-loop: drop the BQL if the I/O appears to be spinning · 893986fe
      Anthony Liguori 提交于
      The char-flow refactoring introduced a busy-wait that depended on
      an action from the VCPU thread.  However, the VCPU thread could
      never take that action because the busy-wait starved the VCPU thread
      of the BQL because it never dropped the mutex while running select.
      
      Paolo doesn't want to drop this optimization for fear that we will
      stop detecting these busy waits.  I'm afraid to keep this optimization
      even with the busy-wait fixed because I think a similar problem can
      occur just with heavy I/O thread load manifesting itself as VCPU pauses.
      
      As a compromise, introduce an artificial timeout after a thousand
      iterations but print a rate limited warning when this happens.  This
      let's us still detect when this condition occurs without it being
      a fatal error.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      Message-id: 1365169560-11012-1-git-send-email-aliguori@us.ibm.com
      893986fe
  26. 15 3月, 2013 1 次提交
  27. 22 2月, 2013 6 次提交
  28. 10 1月, 2013 1 次提交
    • F
      Check return values from g_poll and select · 5e3bc735
      Fabien Chouteau 提交于
      The current implementation of os_host_main_loop_wait() on Windows,
      returns 1 only when a g_poll() event occurs because the return value of
      select() is overridden. This is wrong as we may skip a socket event, as
      shown in this example:
      
      1. select() returns 0
      2. g_poll() returns 1  (socket event occurs)
      3. os_host_main_loop_wait() returns 1
      4. qemu_iohandler_poll() sees no socket event because select() has
         return before the event occurs
      5. select() returns 1
      6. g_poll() returns 0 (g_poll overrides select's return value)
      7. os_host_main_loop_wait() returns 0
      8. qemu_iohandler_poll() doesn't check for socket events because the
         return value of os_host_main_loop_wait() is zero.
      9. goto 5
      
      This patch use one variable for each of these return values, so we don't
      miss a select() event anymore.
      
      Also move the call to select() after g_poll(), this will improve latency
      as we don't have to go through two os_host_main_loop_wait() calls to
      detect a socket event.
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NFabien Chouteau <chouteau@adacore.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      5e3bc735
  29. 19 12月, 2012 2 次提交