1. 09 May, 2014 1 commit
    • Kirill Batuzov's avatar
      vl.c: remove init_clocks call from main · 02ce232c
      Kirill Batuzov authored
      Clocks are initialized in qemu_init_main_loop. They are not needed before it.
      Initializing them twice is not only unnecessary but is harmful: it results in
      memory leak and potentially can lead to a situation where different parts of
      QEMU use different sets of timers.
      
      To avoid it remove init_clocks call from main and add an assertion to
      qemu_clock_init that corresponding clock has not been initialized yet.
      Signed-off-by: default avatarKirill Batuzov <batuzovk@ispras.ru>
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      02ce232c
  2. 07 May, 2014 1 commit
  3. 17 Oct, 2013 3 commits
  4. 18 Sep, 2013 3 commits
    • Paolo Bonzini's avatar
      qemu-timer: do not take the lock in timer_pending · 3db1ee7c
      Paolo Bonzini authored
      We can deduce the result from expire_time, by making it always -1 if
      the timer is not in the active_timers list.  We need to check against
      negative times passed to timer_mod_ns; clamping them to zero is not
      a problem because the only clock that has a zero value at VM startup
      is QEMU_CLOCK_VIRTUAL, and it is monotonic so it cannot be non-zero.
      QEMU_CLOCK_HOST, instead, is not monotonic but it cannot go to negative
      values unless the host time is seriously screwed up and points to
      the 1960s.
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      3db1ee7c
    • Stefan Hajnoczi's avatar
      qemu-timer: make qemu_timer_mod_ns() and qemu_timer_del() thread-safe · 978f2205
      Stefan Hajnoczi authored
      Introduce QEMUTimerList->active_timers_lock to protect the linked list
      of active timers.  This allows qemu_timer_mod_ns() to be called from any
      thread.
      
      Note that vm_clock is not thread-safe and its use of
      qemu_clock_has_timers() works fine today but is also not thread-safe.
      
      The purpose of this patch is to eventually let device models set or
      cancel timers from a vcpu thread without holding the global mutex.
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      978f2205
    • Stefan Hajnoczi's avatar
      qemu-timer: drop outdated signal safety comments · da718ceb
      Stefan Hajnoczi authored
      host_alarm_handler() is invoked from the signal processing thread
      (currently the iothread).  Previously we did processing in a real signal
      handler with signalfd and therefore needed signal-safe timer code.
      
      Today host_alarm_handler() just marks the alarm timer as expired/pending
      and notifies the main loop using qemu_notify_event().
      
      Therefore these outdated comments about signal safety can be dropped.
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      da718ceb
  5. 22 Aug, 2013 17 commits
  6. 12 Apr, 2013 1 commit
  7. 19 Dec, 2012 5 commits
  8. 10 Nov, 2012 1 commit
  9. 04 Nov, 2012 1 commit
  10. 02 Nov, 2012 1 commit
  11. 30 Oct, 2012 1 commit
  12. 28 Oct, 2012 1 commit
  13. 23 Sep, 2012 1 commit
  14. 04 Sep, 2012 1 commit
  15. 09 Aug, 2012 1 commit
  16. 02 Aug, 2012 1 commit
    • Peter Maydell's avatar
      Support 'help' as a synonym for '?' in command line options · c8057f95
      Peter Maydell authored
      For command line options which permit '?' meaning 'please list the
      permitted values', add support for 'help' as a synonym, by abstracting
      the check out into a helper function.
      
      This change means that in some cases where we were being lazy in
      our string parsing, "?junk" will now be rejected as an invalid option
      rather than being (undocumentedly) treated the same way as "?".
      
      Update the documentation to use 'help' rather than '?', since '?'
      is a shell metacharacter and thus prone to fail confusingly if there
      is a single character filename in the current working directory and
      the '?' has not been escaped. It's therefore better to steer users
      towards 'help', though '?' is retained for backwards compatibility.
      
      We do not, however, update the output of the system emulator's -help
      (or any documentation autogenerated from the qemu-options.hx which
      is the source of the -help text) because libvirt parses our -help
      output and will break. At a later date when QEMU provides a better
      interface so libvirt can avoid having to do this, we can update the
      -help text too.
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
      c8057f95