1. 23 2月, 2016 1 次提交
    • P
      include: Clean up includes · 90ce6e26
      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.
      
      NB: If this commit breaks compilation for your out-of-tree
      patchseries or fork, then you need to make sure you add
      #include "qemu/osdep.h" to any new .c files that you have.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      90ce6e26
  2. 11 2月, 2016 1 次提交
  3. 11 1月, 2016 1 次提交
  4. 10 11月, 2015 1 次提交
  5. 16 10月, 2015 1 次提交
    • J
      util - add automated ID generation utility · a0f19136
      Jeff Cody 提交于
      Multiple sub-systems in QEMU may find it useful to generate IDs
      for objects that a user may reference via QMP or HMP.  This patch
      presents a standardized way to do it, so that automatic ID generation
      follows the same rules.
      
      This patch enforces the following rules when generating an ID:
      
      1.) Guarantee no collisions with a user-specified ID
      2.) Identify the sub-system the ID belongs to
      3.) Guarantee of uniqueness
      4.) Spoiling predictability, to avoid creating an assumption
          of object ordering and parsing (i.e., we don't want users to think
          they can guess the next ID based on prior behavior).
      
      The scheme for this is as follows (no spaces):
      
                      # subsys D RR
      Reserved char --|    |   | |
      Subsystem String ----|   | |
      Unique number (64-bit) --| |
      Two-digit random number ---|
      
      For example, a generated node-name for the block sub-system may look
      like this:
      
          #block076
      
      The caller of id_generate() is responsible for freeing the generated
      node name string with g_free().
      Reviewed-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NAlberto Garcia <berto@igalia.com>
      Signed-off-by: NJeff Cody <jcody@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      a0f19136
  6. 25 9月, 2015 1 次提交
  7. 09 9月, 2015 4 次提交
  8. 07 9月, 2015 2 次提交
  9. 19 8月, 2015 3 次提交
  10. 28 7月, 2015 1 次提交
  11. 06 7月, 2015 1 次提交
    • P
      Stop including qemu-common.h in memory.h · fba0a593
      Peter Maydell 提交于
      Including qemu-common.h from other header files is generally a bad
      idea, because it means it's very easy to end up with a circular
      dependency. For instance, if we wanted to include memory.h from
      qom/cpu.h we'd end up with this loop:
       memory.h -> qemu-common.h -> cpu.h -> cpu-qom.h -> qom/cpu.h -> memory.h
      
      Remove the include from memory.h. This requires us to fix up a few
      other files which were inadvertently getting declarations indirectly
      through memory.h.
      
      The biggest change is splitting the fprintf_function typedef out
      into its own header so other headers can get at it without having
      to include qemu-common.h.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-Id: <1435933104-15216-1-git-send-email-peter.maydell@linaro.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      fba0a593
  12. 26 6月, 2015 1 次提交
  13. 04 6月, 2015 1 次提交
  14. 30 4月, 2015 1 次提交
  15. 03 3月, 2015 1 次提交
  16. 14 1月, 2015 1 次提交
  17. 02 11月, 2014 1 次提交
    • M
      pidfile: stop making pidfile error a special case · fee78fd6
      Michael Tokarev 提交于
      In case of -daemonize, we write non-zero to the daemon
      pipe only if pidfile creation failed, so the parent will
      report error about pidfile problem.  There's no need to
      make special case for this, since all other errors are
      reported by the child just fine.  Let the parent report
      error and simplify logic in os_daemonize().
      
      This way, we don't need os_pidfile_error() function, since
      it only prints error now, so put the error reporting printf
      into the only place where qemu_create_pidfile() is called,
      in vl.c.
      
      While at it, fix wrong indentation in os_daemonize().
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      fee78fd6
  18. 03 10月, 2014 1 次提交
    • M
      util: Emancipate id_wellformed() from QemuOpts · f5bebbbb
      Markus Armbruster 提交于
      IDs have long spread beyond QemuOpts: not everything with an ID
      necessarily goes through QemuOpts.  Commit 9aebf3b8 is about such a
      case: block layer names are meant to be well-formed IDs, but some of
      them don't go through QemuOpts, and thus weren't checked.  The commit
      fixed that the straightforward way: rename the internal QemuOpts
      helper id_wellformed() to qemu_opts_id_wellformed() and give it
      external linkage.
      
      Instead of using it directly in block.c, the commit adds wrapper
      bdrv_is_valid_name(), probably to hide the connection to QemuOpts.
      
      Go one logical step further: emancipate IDs from QemuOpts.  Rename the
      function back to id_wellformed(), and put it in another file.  While
      there, clean up its value to bool.  Peel off the bdrv_is_valid_name()
      wrapper.
      
      [Replaced stray return 0 with return false to match bool returns used
      elsewhere in id_wellformed().
      --Stefan]
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      f5bebbbb
  19. 11 9月, 2014 1 次提交
  20. 07 8月, 2014 1 次提交
  21. 06 8月, 2014 2 次提交
  22. 14 7月, 2014 1 次提交
    • K
      dma-helpers: Fix too long qiov · 58f423fb
      Kevin Wolf 提交于
      If the size of the scatter/gather list isn't a multiple of 512, the
      number of sectors for the block layer request is rounded down, resulting
      in a qiov that doesn't match the request length. Truncate the qiov to the
      new length of the request.
      
      This fixes the IDE qtest case /x86_64/ide/bmdma/short_prdt.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      58f423fb
  23. 18 6月, 2014 1 次提交
  24. 19 5月, 2014 1 次提交
  25. 08 5月, 2014 1 次提交
  26. 27 3月, 2014 1 次提交
  27. 22 2月, 2014 1 次提交
  28. 20 2月, 2014 1 次提交
  29. 15 2月, 2014 1 次提交
  30. 12 9月, 2013 1 次提交
  31. 13 7月, 2013 1 次提交
  32. 28 6月, 2013 2 次提交