1. 23 5月, 2015 3 次提交
    • J
      qtest: add memset to qtest protocol · 4d007963
      John Snow 提交于
      Previously, memset was just a frontend to write() and only
      stupidly sent the pattern many times across the wire.
      
      Let's not discuss who stupidly wrote it like that in the first place.
      (Hint: It was me.)
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Message-id: 1430864578-22072-4-git-send-email-jsnow@redhat.com
      4d007963
    • J
      qtest: Add base64 encoded read/write · 7a6a740d
      John Snow 提交于
      For larger pieces of data that won't need to be debugged and
      viewing the hex nibbles is unlikely to be useful, we can encode
      data using base64 instead of encoding each byte as %02x, which
      leads to some space savings and faster reads/writes.
      
      For now, the default is left as hex nibbles in memwrite() and memread().
      For the purposes of making qtest io easier to read and debug, some
      callers may want to specify using the old encoding format for small
      patches of data where the savings from base64 wouldn't be that profound.
      
      memwrite/memread use a data encoding that takes 2x the size of the original
      buffer, but base64 uses "only" (4/3)x, so for larger buffers we can save a
      decent amount of time and space.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Message-id: 1430864578-22072-3-git-send-email-jsnow@redhat.com
      7a6a740d
    • J
      qtest: allow arbitrarily long sends · 332cc7e9
      John Snow 提交于
      qtest currently has a static buffer of size 1024 that if we
      overflow, ignores the additional data silently which leads
      to hangs or stream failures.
      
      Use glib's string facilities to allow arbitrarily long data,
      but split this off into a new function, qtest_sendf.
      
      Static data can still be sent using qtest_send, which avoids
      the malloc/copy overhead.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-id: 1430864578-22072-2-git-send-email-jsnow@redhat.com
      332cc7e9
  2. 26 2月, 2015 1 次提交
  3. 23 10月, 2014 2 次提交
  4. 09 10月, 2014 1 次提交
  5. 04 10月, 2014 2 次提交
    • E
      accel: Rename 'init' method to 'init_machine' · 0d15da8e
      Eduardo Habkost 提交于
      Today, all accelerator init functions affect some global state:
      * tcg_init() calls tcg_exec_init() and affects globals such as tcg_tcx,
        page size globals, and possibly others;
      * kvm_init() changes the kvm_state global, cpu_interrupt_handler, and possibly
        others;
      * xen_init() changes the xen_xc global, and registers a change state handler.
      
      With the new accelerator QOM classes, initialization may now be split in two
      steps:
      * instance_init() will do basic initialization that doesn't affect any global
        state and don't need MachineState or MachineClass data. This will allow
        probing code to safely create multiple accelerator objects on the fly just
        for reporting host/accelerator capabilities, for example.
      * accel_init_machine()/init_machine() will save the accelerator object in
        MachineState, and do initialization steps which still affect global state,
        machine state, or that need data from MachineClass or MachineState.
      
      To clarify the difference between those two steps, rename init() to
      init_machine().
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      0d15da8e
    • E
      accel: Move qtest accel registration to qtest.c · 3a6ce514
      Eduardo Habkost 提交于
      As qtest_availble() returns 1 only when CONFIG_POSIX is set, keep
      setting AccelClass.available to keep current behavior (this is different
      from what we did for KVM and Xen).
      
      This also allows us to make qtest_init_accel() static.
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      3a6ce514
  6. 06 8月, 2014 1 次提交
  7. 10 6月, 2014 1 次提交
  8. 28 5月, 2014 1 次提交
  9. 06 5月, 2014 1 次提交
  10. 05 3月, 2014 1 次提交
  11. 15 2月, 2014 1 次提交
  12. 14 2月, 2014 1 次提交
  13. 05 2月, 2014 1 次提交
  14. 10 12月, 2013 1 次提交
    • P
      qtest: split configuration of qtest accelerator and chardev · d4fce24f
      Paolo Bonzini 提交于
      qtest uses the icount infrastructure to implement a test-driven vm_clock.  This
      however is not necessary when using -qtest as a "probe" together with a normal
      TCG-, KVM- or Xen-based virtual machine.  Hence, split out the call to
      configure_icount into a new function that is called only for "-machine
      accel=qtest"; and disable those commands when running with an accelerator
      other than qtest.
      
      This also fixes an assertion failure with "qemu-system-x86_64 -machine
      accel=qtest" but no -qtest option.  This is a valid case, albeit somewhat
      weird; nothing will happen in the VM but you'll still be able to
      interact with the monitor or the GUI.
      
      Now that qtest_init is not limited to an int(void) function, change
      global variables that are not used outside qtest_init to arguments.
      
      And finally, cleanup useless parts of include/sysemu/qtest.h.  The file
      is not used at all for user-only emulation, and qtest is not available
      on Win32 due to its usage of sigwait.
      Reported-by: NMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Tested-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      d4fce24f
  15. 03 9月, 2013 1 次提交
  16. 23 8月, 2013 3 次提交
  17. 19 7月, 2013 1 次提交
  18. 22 4月, 2013 1 次提交
  19. 16 4月, 2013 1 次提交
  20. 26 3月, 2013 1 次提交
  21. 18 2月, 2013 1 次提交
  22. 12 2月, 2013 1 次提交
  23. 02 2月, 2013 1 次提交
  24. 19 12月, 2012 3 次提交
  25. 24 4月, 2012 1 次提交
  26. 03 4月, 2012 1 次提交
  27. 02 4月, 2012 1 次提交
  28. 31 3月, 2012 1 次提交
  29. 30 3月, 2012 3 次提交
    • P
      qtest: add clock management · 8156be56
      Paolo Bonzini 提交于
      This patch combines qtest and -icount together to turn the vm_clock
      into a source that can be fully managed by the client.  To this end new
      commands clock_step and clock_set are added.  Hooking them with libqtest
      is left as an exercise to the reader.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      8156be56
    • P
      qtest: IRQ interception infrastructure · 20288345
      Paolo Bonzini 提交于
      Since /i440fx/piix3 is being removed from the composition tree, the
      IO-APIC is placed under /i440fx.  This is wrong and should be changed
      as soon as the /i440fx/piix3 path is put back.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      20288345
    • A
      qtest: add test framework · c7f0f3b1
      Anthony Liguori 提交于
      The idea behind qtest is pretty simple.  Instead of executing a CPU via TCG or
      KVM, rely on an external process to send events to the device model that the CPU
      would normally generate.
      
      qtest presents itself as an accelerator.  In addition, a new option is added to
      establish a qtest server (-qtest) that takes a character device.  This is what
      allows the external process to send CPU events to the device model.
      
      qtest uses a simple line based protocol to send the events.  Documentation of
      that protocol is in qtest.c.
      
      I considered reusing the monitor for this job.  Adding interrupts would be a bit
      difficult.  In addition, logging would also be difficult.
      
      qtest has extensive logging support.  All protocol commands are logged with
      time stamps using a new command line option (-qtest-log).  Logging is important
      since ultimately, this is a feature for debugging.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      c7f0f3b1