1. 19 6月, 2015 1 次提交
  2. 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
  3. 25 3月, 2015 1 次提交
  4. 10 3月, 2015 2 次提交
    • M
      scsi: Convert remaining PCI HBAs to realize() · ae071cc8
      Markus Armbruster 提交于
      These are "am53c974", "dc390", "lsi53c895a", "lsi53c810", "megasas",
      "megasas-gen2".
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NPeter Crosthwaite <peter.crosthwaite@xilinx.com>
      Message-Id: <1425925048-15482-5-git-send-email-armbru@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      ae071cc8
    • M
      scsi: Clean up duplicated error in legacy if=scsi code · fa617181
      Markus Armbruster 提交于
      Commit a818a4b6 changed scsi_bus_legacy_handle_cmdline() to report
      errors from scsi_bus_legacy_add_drive() with error_report() in
      addition to returning them.  That's inappropriate.
      
      Two kinds of callers:
      
      1. realize methods (devices "esp", "virtio-scsi-device" and
         "spapr-vscsi")
      
         The error object gets passed up the call chain until it gets
         reported again and freed.
      
         Example:
      
         $ qemu-system-arm -M virt -S -display none \
         > -drive if=scsi,id=foo,bus=1,file=tmp.qcow2 \
         > -device nec-usb-xhci -device usb-storage,drive=foo \
         > -device virtio-scsi-pci
         qemu-system-arm: -drive if=scsi,id=foo,bus=1,file=tmp.qcow2: Property 'scsi-disk.drive' can't take value 'foo', it's in use
         qemu-system-arm: -drive if=scsi,id=foo,bus=1,file=tmp.qcow2: Setting drive property failed
         qemu-system-arm: -device virtio-scsi-pci: Setting drive property failed
         qemu-system-arm: -device virtio-scsi-pci: Device initialization failed
         qemu-system-arm: -device virtio-scsi-pci: Device 'virtio-scsi-pci' could not be initialized
      
         The second message in this error cascade comes from
         scsi_bus_legacy_handle_cmdline().  The error object then gets
         passed up to the qdev_init() called from
         virtio_scsi_pci_init_pci(), which reports it again.
      
      2. init methods (devices "am53c974", "dc390", "lsi53c895a",
         "lsi53c810", "megasas", "megasas-gen2")
      
         init methods need to report their errors with qerror_report().
         These don't.  The inappropriate error_report() papers over the bug.
      
         error_report() isn't the same as qerror_report() in QMP context,
         but this can't actually happen: QMP can still only hot-plug, and
         callers call scsi_bus_legacy_handle_cmdline() only on cold-plug.
         Except for sysbus_esp_realize(), but that can't be hot-plugged at
         all, as far as I can tell.
      
      Fix the init methods and drop the inappropriate error_report() in
      scsi_bus_legacy_handle_cmdline().
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NPeter Crosthwaite <peter.crosthwaite@xilinx.com>
      Message-Id: <1425925048-15482-2-git-send-email-armbru@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      fa617181
  5. 15 12月, 2014 1 次提交
  6. 31 10月, 2014 11 次提交
  7. 20 10月, 2014 1 次提交
    • M
      hw: Convert from BlockDriverState to BlockBackend, mostly · 4be74634
      Markus Armbruster 提交于
      Device models should access their block backends only through the
      block-backend.h API.  Convert them, and drop direct includes of
      inappropriate headers.
      
      Just four uses of BlockDriverState are left:
      
      * The Xen paravirtual block device backend (xen_disk.c) opens images
        itself when set up via xenbus, bypassing blockdev.c.  I figure it
        should go through qmp_blockdev_add() instead.
      
      * Device model "usb-storage" prompts for keys.  No other device model
        does, and this one probably shouldn't do it, either.
      
      * ide_issue_trim_cb() uses bdrv_aio_discard() instead of
        blk_aio_discard() because it fishes its backend out of a BlockAIOCB,
        which has only the BlockDriverState.
      
      * PC87312State has an unused BlockDriverState[] member.
      
      The next two commits take care of the latter two.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      4be74634
  8. 18 8月, 2014 1 次提交
  9. 18 6月, 2014 1 次提交
  10. 16 6月, 2014 1 次提交
  11. 20 5月, 2014 1 次提交
  12. 28 4月, 2014 3 次提交
  13. 15 2月, 2014 1 次提交
  14. 11 2月, 2014 5 次提交
  15. 14 10月, 2013 1 次提交
  16. 31 8月, 2013 1 次提交
  17. 29 7月, 2013 1 次提交
  18. 23 7月, 2013 4 次提交
  19. 04 7月, 2013 2 次提交