1. 15 Sep, 2017 1 commit
  2. 14 Jul, 2017 1 commit
  3. 02 Jun, 2017 2 commits
  4. 28 Feb, 2017 1 commit
  5. 23 Feb, 2017 1 commit
  6. 27 Jan, 2017 1 commit
  7. 12 Jan, 2017 1 commit
  8. 24 Oct, 2016 4 commits
  9. 13 Oct, 2016 1 commit
  10. 23 Sep, 2016 2 commits
  11. 09 Sep, 2016 1 commit
  12. 19 May, 2016 1 commit
  13. 22 Mar, 2016 1 commit
    • Markus Armbruster's avatar
      include/qemu/osdep.h: Don't include qapi/error.h · da34e65c
      Markus Armbruster authored
      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: 's avatarMarkus Armbruster <armbru@redhat.com>
      [Fix compilation without the spice devel packages. - Paolo]
      Signed-off-by: 's avatarPaolo Bonzini <pbonzini@redhat.com>
      da34e65c
  14. 04 Feb, 2016 1 commit
    • Peter Maydell's avatar
      all: Clean up includes · d38ea87a
      Peter Maydell authored
      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: 's avatarPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1454089805-5470-16-git-send-email-peter.maydell@linaro.org
      d38ea87a
  15. 10 Nov, 2015 1 commit
  16. 29 Sep, 2015 1 commit
  17. 22 May, 2015 4 commits
    • John Snow's avatar
      qtest: pre-buffer hex nibs · 5560b85a
      John Snow authored
      Instead of converting each byte one-at-a-time and then sending each byte
      over the wire, use sprintf() to pre-compute all of the hex nibs into a
      single buffer, then send the entire buffer all at once.
      
      This gives a moderate speed boost to memread() and memwrite() functions.
      Signed-off-by: 's avatarJohn Snow <jsnow@redhat.com>
      Reviewed-by: 's avatarMarkus Armbruster <armbru@redhat.com>
      Message-id: 1431021095-7558-2-git-send-email-jsnow@redhat.com
      5560b85a
    • John Snow's avatar
      qtest: add memset to qtest protocol · 4d007963
      John Snow authored
      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: 's avatarJohn Snow <jsnow@redhat.com>
      Message-id: 1430864578-22072-4-git-send-email-jsnow@redhat.com
      4d007963
    • John Snow's avatar
      qtest: Add base64 encoded read/write · 7a6a740d
      John Snow authored
      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: 's avatarJohn Snow <jsnow@redhat.com>
      Message-id: 1430864578-22072-3-git-send-email-jsnow@redhat.com
      7a6a740d
    • John Snow's avatar
      qtest: allow arbitrarily long sends · 332cc7e9
      John Snow authored
      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: 's avatarJohn Snow <jsnow@redhat.com>
      Reviewed-by: 's avatarEric Blake <eblake@redhat.com>
      Message-id: 1430864578-22072-2-git-send-email-jsnow@redhat.com
      332cc7e9
  18. 26 Feb, 2015 1 commit
  19. 23 Oct, 2014 2 commits
  20. 09 Oct, 2014 1 commit
  21. 04 Oct, 2014 2 commits
    • Eduardo Habkost's avatar
      accel: Rename 'init' method to 'init_machine' · 0d15da8e
      Eduardo Habkost authored
      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: 's avatarEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: 's avatarPaolo Bonzini <pbonzini@redhat.com>
      0d15da8e
    • Eduardo Habkost's avatar
      accel: Move qtest accel registration to qtest.c · 3a6ce514
      Eduardo Habkost authored
      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: 's avatarPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: 's avatarEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: 's avatarPaolo Bonzini <pbonzini@redhat.com>
      3a6ce514
  22. 06 Aug, 2014 1 commit
  23. 10 Jun, 2014 1 commit
  24. 28 May, 2014 1 commit
  25. 05 May, 2014 1 commit
  26. 05 Mar, 2014 1 commit
  27. 14 Feb, 2014 1 commit
  28. 13 Feb, 2014 1 commit
  29. 05 Feb, 2014 1 commit
  30. 10 Dec, 2013 1 commit
    • Paolo Bonzini's avatar
      qtest: split configuration of qtest accelerator and chardev · d4fce24f
      Paolo Bonzini authored
      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: 's avatarMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: 's avatarMichael S. Tsirkin <mst@redhat.com>
      Tested-by: 's avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: 's avatarPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: 's avatarMichael S. Tsirkin <mst@redhat.com>
      d4fce24f