1. 04 7月, 2017 1 次提交
  2. 25 1月, 2017 1 次提交
  3. 23 3月, 2016 1 次提交
    • M
      include/qemu/osdep.h: Don't include qapi/error.h · da34e65c
      Markus Armbruster 提交于
      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: NMarkus Armbruster <armbru@redhat.com>
      [Fix compilation without the spice devel packages. - Paolo]
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      da34e65c
  4. 29 1月, 2016 1 次提交
    • P
      pci: Clean up includes · 97d5408f
      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.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1453832250-766-23-git-send-email-peter.maydell@linaro.org
      97d5408f
  5. 11 9月, 2015 1 次提交
  6. 23 6月, 2015 1 次提交
  7. 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
  8. 11 3月, 2015 1 次提交
  9. 17 2月, 2015 1 次提交
  10. 25 11月, 2014 1 次提交
    • M
      hw/pci: fix crash on shpc error flow · 109e90e4
      Marcel Apfelbaum 提交于
      If the pci bridge enters in error flow as part
      of init process it will only delete the shpc mmio
      subregion but not remove it from the properties list,
      resulting in segmentation fault when the bridge runs
      the exit function.
      
      Example: add a pci bridge without specifing the chassis number:
          <qemu-bin> ... -device pci-bridge,id=p1
      Result:
          (qemu) qemu-system-x86_64: -device pci-bridge,id=p1: Bridge chassis not specified. Each bridge is required to be assigned a unique chassis id > 0.
          qemu-system-x86_64: -device pci-bridge,id=p1: Device
          initialization failed.
          Segmentation fault (core dumped)
      
          if (child->class->unparent) {
          #0  0x00005555558d629b in object_finalize_child_property (obj=0x555556d2e830, name=0x555556d30630 "shpc-mmio[0]", opaque=0x555556a42fc8) at qom/object.c:1078
          #1  0x00005555558d4b1f in object_property_del_all (obj=0x555556d2e830) at qom/object.c:367
          #2  0x00005555558d4ca1 in object_finalize (data=0x555556d2e830) at qom/object.c:412
          #3  0x00005555558d55a1 in object_unref (obj=0x555556d2e830) at qom/object.c:720
          #4  0x000055555572c907 in qdev_device_add (opts=0x5555563544f0) at qdev-monitor.c:566
          #5  0x0000555555744f16 in device_init_func (opts=0x5555563544f0, opaque=0x0) at vl.c:2213
          #6  0x00005555559cf5f0 in qemu_opts_foreach (list=0x555555e0f8e0 <qemu_device_opts>, func=0x555555744efa <device_init_func>, opaque=0x0, abort_on_failure=1) at util/qemu-option.c:1057
          #7  0x000055555574a11b in main (argc=16, argv=0x7fffffffdde8, envp=0x7fffffffde70) at vl.c:423
      
      Unparent the shpc mmio region as part of shpc cleanup.
      Signed-off-by: NMarcel Apfelbaum <marcel.a@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NAmos Kong <akong@redhat.com>
      109e90e4
  11. 17 11月, 2014 1 次提交
  12. 15 10月, 2014 1 次提交
  13. 18 8月, 2014 1 次提交
  14. 10 2月, 2014 1 次提交
  15. 06 11月, 2013 1 次提交
  16. 14 10月, 2013 1 次提交
  17. 04 7月, 2013 2 次提交
  18. 01 3月, 2013 1 次提交
  19. 19 12月, 2012 1 次提交
  20. 17 12月, 2012 3 次提交
  21. 23 10月, 2012 1 次提交
    • A
      Rename target_phys_addr_t to hwaddr · a8170e5e
      Avi Kivity 提交于
      target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are
      reserved) and its purpose doesn't match the name (most target_phys_addr_t
      addresses are not target specific).  Replace it with a finger-friendly,
      standards conformant hwaddr.
      
      Outstanding patchsets can be fixed up with the command
      
        git rebase -i --exec 'find -name "*.[ch]"
                              | xargs s/target_phys_addr_t/hwaddr/g' origin
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      a8170e5e
  22. 24 8月, 2012 1 次提交
    • P
      qom: object_delete should unparent the object first · da5a44e8
      Paolo Bonzini 提交于
      object_deinit is only called when the reference count goes to zero,
      and yet tries to do an object_unparent.  Now, object_unparent
      either does nothing or it will decrease the reference count.
      Because we know the reference count is zero, the object_unparent
      call in object_deinit is useless.
      
      Instead, we need to disconnect the object from its parent just
      before we remove the last reference apart from the parent's.  This
      happens in object_delete.  Once we do this, all calls to
      object_unparent peppered through QEMU can go away.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      da5a44e8
  23. 07 6月, 2012 1 次提交
  24. 16 3月, 2012 1 次提交
    • M
      shpc: standard hot plug controller · 1dc324d2
      Michael S. Tsirkin 提交于
      This adds support for SHPC interface, as defined by PCI Standard
      Hot-Plug Controller and Subsystem Specification, Rev 1.0
      http://www.pcisig.com/specifications/conventional/pci_hot_plug/SHPC_10
      
      Only SHPC intergrated with a PCI-to-PCI bridge is supported,
      SHPC integrated with a host bridge would need more work.
      
      All main SHPC features are supported:
      - MRL sensor
      - Attention button
      - Attention indicator
      - Power indicator
      
      Wake on hotplug and serr generation are stubbed out but unused
      as we don't have interfaces to generate these events ATM.
      
      One issue that isn't completely resolved is that qemu currently
      expects an "eject" interface, which SHPC does not provide: it merely
      removes the power to device and it's up to the user to remove the device
      from slot. This patch works around that by ejecting the device
      when power is removed and power LED goes off.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      1dc324d2