1. 24 10月, 2016 4 次提交
  2. 14 9月, 2016 1 次提交
    • D
      hw: replace most use of qemu_chr_fe_write with qemu_chr_fe_write_all · 6ab3fc32
      Daniel P. Berrange 提交于
      The qemu_chr_fe_write method will return -1 on EAGAIN if the
      chardev backend write would block. Almost no callers of the
      qemu_chr_fe_write() method check the return value, instead
      blindly assuming data was successfully sent. In most cases
      this will lead to silent data loss on interactive consoles,
      but in some cases (eg RNG EGD) it'll just cause corruption
      of the protocol being spoken.
      
      We unfortunately can't fix the virtio-console code, due to
      a bug in the Linux guest drivers, which would cause the
      entire Linux kernel to hang if we delay processing of the
      incoming data in any way. Fixing this requires first fixing
      the guest driver to not hold spinlocks while writing to the
      hvc device backend.
      
      Fixes bug: https://bugs.launchpad.net/qemu/+bug/1586756Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-Id: <1473170165-540-4-git-send-email-berrange@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      6ab3fc32
  3. 19 5月, 2016 1 次提交
  4. 12 5月, 2016 1 次提交
  5. 23 3月, 2016 3 次提交
  6. 21 1月, 2016 1 次提交
  7. 19 1月, 2016 1 次提交
  8. 07 9月, 2015 1 次提交
    • M
      arm: Use g_new() & friends where that makes obvious sense · b45c03f5
      Markus Armbruster 提交于
      g_new(T, n) is neater than g_malloc(sizeof(T) * n).  It's also safer,
      for two reasons.  One, it catches multiplication overflowing size_t.
      Two, it returns T * rather than void *, which lets the compiler catch
      more type errors.
      
      This commit only touches allocations with size arguments of the form
      sizeof(T).
      
      Coccinelle semantic patch:
      
          @@
          type T;
          @@
          -g_malloc(sizeof(T))
          +g_new(T, 1)
          @@
          type T;
          @@
          -g_try_malloc(sizeof(T))
          +g_try_new(T, 1)
          @@
          type T;
          @@
          -g_malloc0(sizeof(T))
          +g_new0(T, 1)
          @@
          type T;
          @@
          -g_try_malloc0(sizeof(T))
          +g_try_new0(T, 1)
          @@
          type T;
          expression n;
          @@
          -g_malloc(sizeof(T) * (n))
          +g_new(T, n)
          @@
          type T;
          expression n;
          @@
          -g_try_malloc(sizeof(T) * (n))
          +g_try_new(T, n)
          @@
          type T;
          expression n;
          @@
          -g_malloc0(sizeof(T) * (n))
          +g_new0(T, n)
          @@
          type T;
          expression n;
          @@
          -g_try_malloc0(sizeof(T) * (n))
          +g_try_new0(T, n)
          @@
          type T;
          expression p, n;
          @@
          -g_realloc(p, sizeof(T) * (n))
          +g_renew(T, p, n)
          @@
          type T;
          expression p, n;
          @@
          -g_try_realloc(p, sizeof(T) * (n))
          +g_try_renew(T, p, n)
          @@
          type T;
          expression n;
          @@
          -(T *)g_new(T, n)
          +g_new(T, n)
          @@
          type T;
          expression n;
          @@
          -(T *)g_new0(T, n)
          +g_new0(T, n)
          @@
          type T;
          expression p, n;
          @@
          -(T *)g_renew(T, p, n)
          +g_renew(T, p, n)
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-id: 1440524394-15640-1-git-send-email-armbru@redhat.com
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      b45c03f5
  9. 28 4月, 2015 1 次提交
    • S
      Convert (ffs(val) - 1) to ctz32(val) · 786a4ea8
      Stefan Hajnoczi 提交于
      This commit was generated mechanically by coccinelle from the following
      semantic patch:
      
      @@
      expression val;
      @@
      - (ffs(val) - 1)
      + ctz32(val)
      
      The call sites have been audited to ensure the ffs(0) - 1 == -1 case
      never occurs (due to input validation, asserts, etc).  Therefore we
      don't need to worry about the fact that ctz32(0) == 32.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Message-id: 1427124571-28598-5-git-send-email-stefanha@redhat.com
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      786a4ea8
  10. 09 4月, 2015 1 次提交
  11. 09 9月, 2014 1 次提交
  12. 30 6月, 2014 2 次提交
  13. 13 5月, 2014 1 次提交
  14. 23 8月, 2013 2 次提交
  15. 20 8月, 2013 1 次提交
  16. 30 7月, 2013 6 次提交
  17. 04 7月, 2013 2 次提交
  18. 16 4月, 2013 1 次提交
  19. 15 4月, 2013 1 次提交
  20. 09 4月, 2013 3 次提交
  21. 01 3月, 2013 1 次提交
    • P
      hw: include hw header files with full paths · 83c9f4ca
      Paolo Bonzini 提交于
      Done with this script:
      
      cd hw
      for i in `find . -name '*.h' | sed 's/^..//'`; do
        echo '\,^#.*include.*["<]'$i'[">], s,'$i',hw/&,'
      done | sed -i -f - `find . -type f`
      
      This is so that paths remain valid as files are moved.
      
      Instead, files in hw/dataplane are referenced with the relative path.
      We know they are not going to move to include/, and they are the only
      include files that are in subdirectories _and_ move.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      83c9f4ca
  22. 22 1月, 2013 1 次提交
  23. 11 1月, 2013 1 次提交
    • A
      Make all static TypeInfos const · 8c43a6f0
      Andreas Färber 提交于
      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: NAndreas Färber <afaerber@suse.de>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      8c43a6f0
  24. 19 12月, 2012 2 次提交