1. 23 May, 2016 1 commit
  2. 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
  3. 08 Mar, 2016 1 commit
  4. 03 Mar, 2016 1 commit
    • Ladi Prosek's avatar
      rng: add request queue support to rng-random · 60253ed1
      Ladi Prosek authored
      Requests are now created in the RngBackend parent class and the
      code path is shared by both rng-egd and rng-random.
      
      This commit fixes the rng-random implementation which processed
      only one request at a time and simply discarded all but the most
      recent one. In the guest this manifested as delayed completion
      of reads from virtio-rng, i.e. a read was completed only after
      another read was issued.
      
      By switching rng-random to use the same request queue as rng-egd,
      the unsafe stack-based allocation of the entropy buffer is
      eliminated and replaced with g_malloc.
      Signed-off-by: 's avatarLadi Prosek <lprosek@redhat.com>
      Reviewed-by: 's avatarAmit Shah <amit.shah@redhat.com>
      Message-Id: <1456994238-9585-5-git-send-email-lprosek@redhat.com>
      Signed-off-by: 's avatarAmit Shah <amit.shah@redhat.com>
      60253ed1
  5. 04 Feb, 2016 1 commit
  6. 22 Jun, 2015 1 commit
  7. 10 Dec, 2014 1 commit
  8. 24 Jun, 2014 1 commit
  9. 06 Jan, 2014 1 commit
  10. 17 Jun, 2013 1 commit
  11. 16 Apr, 2013 1 commit
  12. 15 Apr, 2013 1 commit
  13. 08 Mar, 2013 1 commit
  14. 10 Jan, 2013 1 commit
    • Andreas Färber's avatar
      Make all static TypeInfos const · 8c43a6f0
      Andreas Färber authored
      Since 39bffca2 (qdev: register all
      types natively through QEMU Object Model), TypeInfo as used in
      the common, non-iterative pattern is no longer amended with information
      and should therefore be const.
      
      Fix the documented QOM examples:
      
       sed -i 's/static TypeInfo/static const TypeInfo/g' include/qom/object.h
      
      Since frequently the wrong examples are being copied by contributors of
      new devices, fix all types in the tree:
      
       sed -i 's/^static TypeInfo/static const TypeInfo/g' */*.c
       sed -i 's/^static TypeInfo/static const TypeInfo/g' */*/*.c
      
      This also avoids to piggy-back these changes onto real functional
      changes or other refactorings.
      Signed-off-by: 's avatarAndreas Färber <afaerber@suse.de>
      Signed-off-by: 's avatarAnthony Liguori <aliguori@us.ibm.com>
      8c43a6f0
  15. 19 Dec, 2012 2 commits
  16. 16 Nov, 2012 1 commit
    • Anthony Liguori's avatar
      rng-random: add an RNG backend that uses /dev/random (v3) · 5c74521d
      Anthony Liguori authored
      The filename can be overridden but it expects a non-blocking source of entropy.
      A typical invocation would be:
      
      qemu -object rng-random,id=rng0 -device virtio-rng-pci,rng=rng0
      
      This can also be used with /dev/urandom by using the command line:
      
      qemu -object rng-random,filename=/dev/urandom,id=rng0 \
           -device virtio-rng-pci,rng=rng0
      Signed-off-by: 's avatarAnthony Liguori <aliguori@us.ibm.com>
      ---
      v1 -> v2
       - merged header split patch into this one
      v2 -> v3
       - bug fix in rng-random (Paolo)
      5c74521d