1. 15 6月, 2017 6 次提交
  2. 05 5月, 2017 1 次提交
  3. 24 3月, 2017 1 次提交
  4. 21 2月, 2017 1 次提交
    • M
      hw/scsi: Concentrate -drive if=scsi auto-create in one place · fb8b660e
      Markus Armbruster 提交于
      The logic to create frontends for -drive if=scsi is in SCSI HBAs.  For
      all other interface types, it's in machine initialization code.
      
      A few machine types create the SCSI HBAs necessary for that.  That's
      also not done for other interface types.
      
      I'm going to deprecate these SCSI eccentricities.  In preparation for
      that, create the frontends in main() instead of the SCSI HBAs, by
      calling new function scsi_legacy_handle_cmdline() there.
      
      Note that not all SCSI HBAs create frontends.  Take care not to change
      that.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <1487161136-9018-2-git-send-email-armbru@redhat.com>
      Acked-By: NPaolo Bonzini <pbonzini@redhat.com>
      fb8b660e
  5. 01 2月, 2017 1 次提交
    • C
      pci: Convert msix_init() to Error and fix callers · ee640c62
      Cao jin 提交于
      msix_init() reports errors with error_report(), which is wrong when
      it's used in realize().  The same issue was fixed for msi_init() in
      commit 1108b2f8. In order to make the API change as small as possible,
      leave the return value check to later patch.
      
      For some devices(like e1000e, vmxnet3, nvme) who won't fail because of
      msix_init's failure, suppress the error report by passing NULL error
      object.
      
      Bonus: add comment for msix_init.
      
      CC: Jiri Pirko <jiri@resnulli.us>
      CC: Gerd Hoffmann <kraxel@redhat.com>
      CC: Dmitry Fleytman <dmitry@daynix.com>
      CC: Jason Wang <jasowang@redhat.com>
      CC: Michael S. Tsirkin <mst@redhat.com>
      CC: Hannes Reinecke <hare@suse.de>
      CC: Paolo Bonzini <pbonzini@redhat.com>
      CC: Alex Williamson <alex.williamson@redhat.com>
      CC: Markus Armbruster <armbru@redhat.com>
      CC: Marcel Apfelbaum <marcel@redhat.com>
      Signed-off-by: NCao jin <caoj.fnst@cn.fujitsu.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      ee640c62
  6. 25 1月, 2017 1 次提交
    • D
      PCI/migration merge vmstate_pci_device and vmstate_pcie_device · 20daa90a
      Dr. David Alan Gilbert 提交于
      The vmstate_pci_device and vmstate_pcie_devices differ
      just in the size of one buffer; combine the two using a _TEST
      macro.
      
      I think this is safe as long as everywhere which currently
      uses either of these two uses the right type.
      
      One thing that concerns me is that some places use pci_device_load/save
      which does some irq mangling, but others just use the VMSTATE_PCI_DEVICE
      macro - how are they getting the same irq mangling?
      
      This passes a smoke test migrate of:
      ./x86_64-softmmu/qemu-system-x86_64 -M pc,accel=kvm -m 1024
      ./littlefed20.img -device e1000e -device virtio-net -device
      e1000 -device virtio-rng -device megasas -device megasas-gen2 -device
      ioh3420 -device nec-usb-xhci
      
      to an unmodified qemu.
      Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Message-Id: <20161214195829.18241-1-dgilbert@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      20daa90a
  7. 17 1月, 2017 1 次提交
  8. 28 11月, 2016 2 次提交
    • P
      megasas: clean up and fix request completion/cancellation · 9e55d588
      Paolo Bonzini 提交于
      megasas_command_cancel is a callback; it should report the abort in
      the frame, not try another abort!  Compare for instance with
      mptsas_request_cancelled.
      
      So extract the common bits for request completion in a new function
      megasas_complete_command, call it from both the .complete and .cancel
      callbacks, and remove duplicate pieces from the DCMD path.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-Id: <20161110152751.4267-2-pbonzini@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      9e55d588
    • P
      megasas: do not call pci_dma_unmap after having freed the frame once · 75f19f8c
      Paolo Bonzini 提交于
      Commit 8cc46787 ("megasas: remove useless check for cmd->frame", 2016-07-17) was
      wrong because I trusted Coverity too much.  It turns out that there _is_ a
      path through which cmd->frame can become NULL.  After megasas_handle_frame's
      switch (md->frame->header.frame_cmd), megasas_init_firmware can be called.
      From there, megasas_reset_frames will call megasas_unmap_frame which resets
      cmd->frame = NULL.
      
      However, there is another bug to fix in there, because megasas_unmap_frame
      is called again after setting the command status.  In this case QEMU should
      not do anything, instead it calls pci_dma_unmap again.  Harmless, but
      better fix it.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      75f19f8c
  9. 14 9月, 2016 1 次提交
  10. 17 7月, 2016 1 次提交
  11. 05 7月, 2016 3 次提交
  12. 20 6月, 2016 1 次提交
    • E
      coccinelle: Remove unnecessary variables for function return value · 9be38598
      Eduardo Habkost 提交于
      Use Coccinelle script to replace 'ret = E; return ret' with
      'return E'. The script will do the substitution only when the
      function return type and variable type are the same.
      
      Manual fixups:
      
      * audio/audio.c: coding style of "read (...)" and "write (...)"
      * block/qcow2-cluster.c: wrap line to make it shorter
      * block/qcow2-refcount.c: change indentation of wrapped line
      * target-tricore/op_helper.c: fix coding style of
        "remainder|quotient"
      * target-mips/dsp_helper.c: reverted changes because I don't
        want to argue about checkpatch.pl
      * ui/qemu-pixman.c: fix line indentation
      * block/rbd.c: restore blank line between declarations and
        statements
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <1465855078-19435-4-git-send-email-ehabkost@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      [Unused Coccinelle rule name dropped along with a redundant comment;
      whitespace touched up in block/qcow2-cluster.c; stale commit message
      paragraph deleted]
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      9be38598
  13. 07 6月, 2016 1 次提交
  14. 29 5月, 2016 3 次提交
  15. 29 1月, 2016 1 次提交
  16. 16 1月, 2016 2 次提交
  17. 04 11月, 2015 1 次提交
  18. 13 10月, 2015 1 次提交
  19. 28 7月, 2015 1 次提交
  20. 19 6月, 2015 1 次提交
  21. 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
  22. 25 3月, 2015 1 次提交
  23. 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
  24. 15 12月, 2014 1 次提交
  25. 31 10月, 2014 4 次提交