1. 16 2月, 2015 2 次提交
  2. 13 2月, 2015 5 次提交
  3. 11 2月, 2015 2 次提交
  4. 10 2月, 2015 1 次提交
  5. 07 2月, 2015 14 次提交
  6. 06 2月, 2015 3 次提交
    • A
      migration: Append JSON description of migration stream · 8118f095
      Alexander Graf 提交于
      One of the annoyances of the current migration format is the fact that
      it's not self-describing. In fact, it's not properly describing at all.
      Some code randomly scattered throughout QEMU elaborates roughly how to
      read and write a stream of bytes.
      
      We discussed an idea during KVM Forum 2013 to add a JSON description of
      the migration protocol itself to the migration stream. This patch
      adds a section after the VM_END migration end marker that contains
      description data on what the device sections of the stream are composed of.
      
      This approach is backwards compatible with any QEMU version reading the
      stream, because QEMU just stops reading after the VM_END marker and ignores
      any data following it.
      
      With an additional external program this allows us to decipher the
      contents of any migration stream and hopefully make migration bugs easier
      to track down.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NAmit Shah <amit.shah@redhat.com>
      Signed-off-by: NJuan Quintela <quintela@redhat.com>
      8118f095
    • A
      qemu-file: Add fast ftell code path · 97221400
      Alexander Graf 提交于
      For ftell we flush the output buffer to ensure that we don't have anything
      lingering in our internal buffers. This is a very safe thing to do.
      
      However, with the dynamic size measurement that the dynamic vmstate
      description will bring this would turn out quite slow.
      
      Instead, we can fast path this specific measurement and just take the
      internal buffers into account when telling the kernel our position.
      
      I'm sure I overlooked some corner cases where this doesn't work, so
      instead of tuning the safe, existing version, this patch adds a fast
      variant of ftell that gets used by the dynamic vmstate description code
      which isn't critical when it fails.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NAmit Shah <amit.shah@redhat.com>
      Signed-off-by: NJuan Quintela <quintela@redhat.com>
      97221400
    • A
      QJSON: Add JSON writer · 190c882c
      Alexander Graf 提交于
      To support programmatic JSON assembly while keeping the code that generates it
      readable, this patch introduces a simple JSON writer. It emits JSON serially
      into a buffer in memory.
      
      The nice thing about this writer is its simplicity and low memory overhead.
      Unlike the QMP JSON writer, this one does not need to spawn QObjects for every
      element it wants to represent.
      
      This is a prerequisite for the migration stream format description generator.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NAmit Shah <amit.shah@redhat.com>
      Signed-off-by: NJuan Quintela <quintela@redhat.com>
      190c882c
  7. 05 2月, 2015 3 次提交
  8. 02 2月, 2015 5 次提交
    • P
      cpu-exec: simplify init_delay_params · 2e91cc62
      Paolo Bonzini 提交于
      With the introduction of QEMU_CLOCK_VIRTUAL_RT, the computation of
      sc->diff_clk can be simplified nicely:
      
              qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) -
              qemu_clock_get_ns(QEMU_CLOCK_REALTIME) +
              cpu_get_clock_offset()
      
           =  qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) -
              (qemu_clock_get_ns(QEMU_CLOCK_REALTIME) - cpu_get_clock_offset())
      
           =  qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) -
              (qemu_clock_get_ns(QEMU_CLOCK_REALTIME) + timers_state.cpu_clock_offset)
      
           =  qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) -
              qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL_RT)
      
      Cc: Sebastian Tanase <sebastian.tanase@openwide.fr>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      2e91cc62
    • P
      memory: protect current_map by RCU · 374f2981
      Paolo Bonzini 提交于
      Replace the flat_view_mutex with RCU, avoiding futex contention for
      dataplane on large systems and many iothreads.
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      374f2981
    • P
      rcu: add call_rcu · 26387f86
      Paolo Bonzini 提交于
      Asynchronous callbacks provided by call_rcu are particularly important
      for QEMU, because the BQL makes it hard to use synchronize_rcu.
      
      In addition, the current RCU implementation is not particularly friendly
      to multiple concurrent synchronize_rcu callers, making call_rcu even
      more important.
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      26387f86
    • P
      d62cb4f2
    • P
      rcu: add rcu library · 7911747b
      Paolo Bonzini 提交于
      This includes a (mangled) copy of the liburcu code.  The main changes
      are: 1) removing dependencies on many other header files in liburcu; 2)
      removing for simplicity the tentative busy waiting in synchronize_rcu,
      which has limited performance effects; 3) replacing futexes in
      synchronize_rcu with QemuEvents for Win32 portability.  The API is
      the same as liburcu, so it should be possible in the future to require
      liburcu on POSIX systems for example and use our copy only on Windows.
      
      Among the various versions available I chose urcu-mb, which is the
      least invasive implementation even though it does not have the
      fastest rcu_read_{lock,unlock} implementation.  The urcu flavor can
      be changed later, after benchmarking.
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      7911747b
  9. 30 1月, 2015 1 次提交
  10. 29 1月, 2015 4 次提交