1. 31 10月, 2014 1 次提交
  2. 20 10月, 2014 2 次提交
  3. 15 10月, 2014 2 次提交
  4. 30 9月, 2014 4 次提交
  5. 26 8月, 2014 2 次提交
  6. 29 7月, 2014 1 次提交
  7. 28 4月, 2014 1 次提交
    • P
      scsi: Improve error messages more · 6ee143a0
      Paolo Bonzini 提交于
      Remove the "scsi-block:" prefix for error messages as suggested
      by Markus.
      
      Improve the previous patch by making the message the same for both
      scsi-block and scsi-generic, including the strerror() output in both
      and making an explicit reference to SG_IO.  Also s/can not/cannot/.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      6ee143a0
  8. 22 2月, 2014 1 次提交
    • F
      scsi: Change scsi sense buf size to 252 · c5f52875
      Fam Zheng 提交于
      Current buffer size fails the assersion check in like
      
          hw/scsi/scsi-bus.c:1655:    assert(req->sense_len <= sizeof(req->sense));
      
      when backend (block/iscsi.c) returns more data then 96.
      
      Exercise the core dump path by booting an Gentoo ISO with scsi-generic
      device backed with iscsi (built with libiscsi 1.7.0):
      
          x86_64-softmmu/qemu-system-x86_64 \
          -drive file=iscsi://localhost:3260/iqn.foobar/0,if=none,id=drive-disk \
          -device virtio-scsi-pci,id=scsi1,bus=pci.0,addr=0x6 \
          -device scsi-generic,drive=drive-disk,bus=scsi1.0,id=iscsi-disk \
          -boot d \
          -cdrom gentoo.iso
      
          qemu-system-x86_64: hw/scsi/scsi-bus.c:1655: scsi_req_complete:
          Assertion `req->sense_len <= sizeof(req->sense)' failed.
      
      According to SPC-4, section 4.5.2.1, 252 is the limit of sense data. So
      increase the value to fix it.
      
      Also remove duplicated define for the macro.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Reviewed-by: NBenoit Canet <benoit@irqsave.net>
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      c5f52875
  9. 25 1月, 2014 1 次提交
  10. 18 6月, 2013 2 次提交
  11. 09 4月, 2013 2 次提交
  12. 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
  13. 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
  14. 19 12月, 2012 2 次提交
  15. 29 9月, 2012 1 次提交
  16. 28 8月, 2012 1 次提交
  17. 02 7月, 2012 1 次提交
    • R
      ISCSI: Add SCSI passthrough via scsi-generic to libiscsi · 98392453
      Ronnie Sahlberg 提交于
      Update iscsi to allow passthrough of SG_IO scsi commands when the iscsi
      device is forced to be scsi-generic.
      
      Implement both bdrv_ioctl() and bdrv_aio_ioctl() in the iscsi backend,
      emulate the SG_IO ioctl and pass the SCSI commands across to the
      iscsi target.
      
      This allows end-to-end passthrough of SCSI all the way from the guest,
      to qemu, via scsi-generic, then libiscsi all the way to the iscsi target.
      
      To activate this you need to specify that the iscsi lun should be treated
      as a scsi-generic device.
      
      Example:
          -device lsi -device scsi-generic,drive=MyISCSI \
          -drive file=iscsi://10.1.1.125/iqn.ronnie.test/1,if=none,id=MyISCSI
      
      Note, you can currently not boot a qemu guest from a scsi device.
      
      Note,
      This only works when the host is linux, since the emulation relies on
      definitions of SG_IO from the scsi-generic implementation in the
      linux kernel.
      It should be fairly easy to re-implement some structures similar enough
      for non-linux hosts to do the same style of passthrough via a fake
      scsi generic layer and libiscsi if need be.
      Signed-off-by: NRonnie Sahlberg <ronniesahlberg@gmail.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      98392453
  18. 22 2月, 2012 1 次提交
  19. 15 2月, 2012 1 次提交
  20. 04 2月, 2012 1 次提交
    • A
      qdev: register all types natively through QEMU Object Model · 39bffca2
      Anthony Liguori 提交于
      This was done in a mostly automated fashion.  I did it in three steps and then
      rebased it into a single step which avoids repeatedly touching every file in
      the tree.
      
      The first step was a sed-based addition of the parent type to the subclass
      registration functions.
      
      The second step was another sed-based removal of subclass registration functions
      while also adding virtual functions from the base class into a class_init
      function as appropriate.
      
      Finally, a python script was used to convert the DeviceInfo structures and
      qdev_register_subclass functions to TypeInfo structures, class_init functions,
      and type_register_static calls.
      
      We are almost fully converted to QOM after this commit.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      39bffca2
  21. 28 1月, 2012 1 次提交
  22. 06 1月, 2012 1 次提交
    • M
      scsi virtio-blk usb-msd: Clean up device init error messages · 6a84cb1f
      Markus Armbruster 提交于
      Replace
      
          error_report("DEVICE-NAME: MESSAGE");
      
      by just
      
          error_report("MESSAGE");
      
      in block device init functions.
      
      DEVICE-NAME is bogus in some cases: it's "scsi-disk" for device
      scsi-hd and scsi-cd, "virtio-blk-pci" for virtio-blk-s390, and
      "usb-msd" for usb-storage.
      
      There is no real need to put a device name in the message, because
      error_report() points to the offending command line option already:
      
      $ qemu-system-x86_64 --nodefaults --enable-kvm -vnc :0 -S -monitor stdio -usb -device virtio-blk-pci
      upstream-qemu: -device virtio-blk-pci: virtio-blk-pci: drive property not set
      upstream-qemu: -device virtio-blk-pci: Device 'virtio-blk-pci' could not be initialized
      
      And for a monitor command, it's obvious anyway:
      
      $ qemu-system-x86_64 --nodefaults --enable-kvm -vnc :0 -S -monitor stdio -usb
      (qemu) device_add virtio-blk-pci
      virtio-blk-pci: drive property not set
      Device 'virtio-blk-pci' could not be initialized
      Reported-by: NAmit Shah <amit.shah@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      6a84cb1f
  23. 15 12月, 2011 1 次提交
    • P
      block: bdrv_aio_* do not return NULL · ad54ae80
      Paolo Bonzini 提交于
      Initially done with the following semantic patch:
      
      @ rule1 @
      expression E;
      statement S;
      @@
        E =
      (
         bdrv_aio_readv
      |  bdrv_aio_writev
      |  bdrv_aio_flush
      |  bdrv_aio_discard
      |  bdrv_aio_ioctl
      )
           (...);
      (
      - if (E == NULL) { ... }
      |
      - if (E)
          { <... S ...> }
      )
      
      which however missed the occurrence in block/blkverify.c
      (as it should have done), and left behind some unused
      variables.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      ad54ae80
  24. 22 11月, 2011 1 次提交
  25. 29 10月, 2011 7 次提交