1. 24 2月, 2017 3 次提交
  2. 16 2月, 2017 1 次提交
  3. 20 1月, 2017 2 次提交
  4. 31 10月, 2016 5 次提交
  5. 26 10月, 2016 1 次提交
  6. 29 9月, 2016 1 次提交
  7. 27 9月, 2016 6 次提交
  8. 14 9月, 2016 2 次提交
  9. 13 9月, 2016 1 次提交
  10. 12 6月, 2016 2 次提交
  11. 30 5月, 2016 2 次提交
  12. 23 5月, 2016 2 次提交
  13. 19 5月, 2016 2 次提交
  14. 05 4月, 2016 1 次提交
  15. 23 3月, 2016 1 次提交
    • R
      Replaced get_tick_per_sec() by NANOSECONDS_PER_SECOND · 73bcb24d
      Rutuja Shah 提交于
      This patch replaces get_ticks_per_sec() calls with the macro
      NANOSECONDS_PER_SECOND. Also, as there are no callers, get_ticks_per_sec()
      is then removed.  This replacement improves the readability and
      understandability of code.
      
      For example,
      
          timer_mod(fdctrl->result_timer,
      	      qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + (get_ticks_per_sec() / 50));
      
      NANOSECONDS_PER_SECOND makes it obvious that qemu_clock_get_ns
      matches the unit of the expression on the right side of the plus.
      Signed-off-by: NRutuja Shah <rutu.shah.26@gmail.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      73bcb24d
  16. 17 3月, 2016 1 次提交
  17. 16 3月, 2016 2 次提交
    • 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
    • P
      icount: remove obsolete warp call · 281b2201
      Pavel Dovgalyuk 提交于
      qemu_clock_warp call in qemu_tcg_wait_io_event function is not needed
      anymore, because it is called in every iteration of main_loop_wait.
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NPavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
      Message-Id: <20160310115603.4812.67559.stgit@PASHA-ISP>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      281b2201
  18. 07 3月, 2016 1 次提交
  19. 19 2月, 2016 1 次提交
    • E
      qapi: Don't box branches of flat unions · 544a3731
      Eric Blake 提交于
      There's no reason to do two malloc's for a flat union; let's just
      inline the branch struct directly into the C union branch of the
      flat union.
      
      Surprisingly, fewer clients were actually using explicit references
      to the branch types in comparison to the number of flat unions
      thus modified.
      
      This lets us reduce the hack in qapi-types:gen_variants() added in
      the previous patch; we no longer need to distinguish between
      alternates and flat unions.
      
      The change to unboxed structs means that u.data (added in commit
      cee2dedb) is now coincident with random fields of each branch of
      the flat union, whereas beforehand it was only coincident with
      pointers (since all branches of a flat union have to be objects).
      Note that this was already the case for simple unions - but there
      we got lucky.  Remember, visit_start_union() blindly returns true
      for all visitors except for the dealloc visitor, where it returns
      the value !!obj->u.data, and that this result then controls
      whether to proceed with the visit to the variant.  Pre-patch,
      this meant that flat unions were testing whether the boxed pointer
      was still NULL, and thereby skipping visit_end_implicit_struct()
      and avoiding a NULL dereference if the pointer had not been
      allocated.  The same was true for simple unions where the current
      branch had pointer type, except there we bypassed visit_type_FOO().
      But for simple unions where the current branch had scalar type, the
      contents of that scalar meant that the decision to call
      visit_type_FOO() was data-dependent - the reason we got lucky there
      is that visit_type_FOO() for all scalar types in the dealloc visitor
      is a no-op (only the pointer variants had anything to free), so it
      did not matter whether the dealloc visit was skipped.  But with this
      patch, we would risk leaking memory if we could skip a call to
      visit_type_FOO_fields() based solely on a data-dependent decision.
      
      But notice: in the dealloc visitor, visit_type_FOO() already handles
      a NULL obj - it was only the visit_type_implicit_FOO() that was
      failing to check for NULL. And now that we have refactored things to
      have the branch be part of the parent struct, we no longer have a
      separate pointer that can be NULL in the first place.  So we can just
      delete the call to visit_start_union() altogether, and blindly visit
      the branch type; there is no change in behavior except to the dealloc
      visitor, where we now unconditionally visit the branch, but where that
      visit is now always safe (for a flat union, we can no longer
      dereference NULL, and for a simple union, visit_type_FOO() was already
      safely handling NULL on pointer types).
      
      Unfortunately, simple unions are not as easy to switch to unboxed
      layout; because we are special-casing the hidden implicit type with
      a single 'data' member, we really DO need to keep calling another
      layer of visit_start_struct(), with a second malloc; although there
      are some cleanups planned for simple unions in later patches.
      
      visit_start_union() and gen_visit_implicit_struct() are now unused.
      Drop them.
      
      Note that after this patch, the only remaining use of
      visit_start_implicit_struct() is for alternate types; the next patch
      will do further cleanup based on that fact.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1455778109-6278-14-git-send-email-eblake@redhat.com>
      [Dead code deletion squashed in, commit message updated accordingly]
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      544a3731
  20. 09 2月, 2016 1 次提交
  21. 29 1月, 2016 1 次提交
    • P
      exec: Clean up includes · 7b31bbc2
      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: 1453832250-766-4-git-send-email-peter.maydell@linaro.org
      7b31bbc2
  22. 26 1月, 2016 1 次提交
    • D
      cpus: use broadcast on qemu_pause_cond · 96bce683
      Dr. David Alan Gilbert 提交于
      Jiri saw a hang on pause_all_vcpus called from postcopy_start,
      where the cpus are all apparently stopped ('stopped' flag set)
      but pause_all_vcpus is still stuck on a cond_wait on qemu_paused_cond.
      We suspect this is happening if a qmp_stop is called at about the
      same time as the postcopy code calls that pause_all_vcpus;
      although they both should have the main lock held, Paolo spotted
      the cond_wait unlocks the global lock so perhaps they both
      could end up waiting at the same time?
      Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Reported-by: NJiri Denemark <jdenemar@redhat.com>
      Message-Id: <1453716498-27238-1-git-send-email-dgilbert@redhat.com>
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      96bce683