1. 01 3月, 2017 3 次提交
  2. 21 2月, 2017 1 次提交
  3. 25 1月, 2017 1 次提交
  4. 17 1月, 2017 1 次提交
  5. 22 12月, 2016 1 次提交
  6. 28 10月, 2016 1 次提交
  7. 14 9月, 2016 2 次提交
    • F
      scsi-disk: Cleaning up around tray open state · cd723b85
      Fam Zheng 提交于
      Even if tray is not open, it can be empty (blk_is_inserted() == false).
      Handle both cases correctly by replacing the s->tray_open checks with
      blk_is_available(), which is an AND of the two.
      
      Also simplify successive checks of them into blk_is_available(), in a
      couple cases.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Message-Id: <1473848224-24809-2-git-send-email-famz@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      cd723b85
    • R
      scsi-disk: change disk serial length from 20 to 36 · 48b62063
      Rony Weng 提交于
      Openstack Cinder assigns volume a 36 characters uuid as serial.
      QEMU will shrinks the uuid to 20 characters, which does not match
      the original uuid.
      
      Note that there is no limit to the length of the serial number in
      the SCSI spec.  20 was copy-pasted from virtio-blk which in turn was
      copy-pasted from ATA; 36 is even more arbitrary.  However, bumping it
      up too much might cause issues (e.g. 252 seems to make sense because
      then the maximum amount of returned data is 256; but who knows there's
      no off-by-one somewhere for such a nicely rounded number).
      Signed-off-by: NRony Weng <ronyweng@synology.com>
      Message-Id: <1472457138-23386-1-git-send-email-ronyweng@synology.com>
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      48b62063
  8. 06 9月, 2016 1 次提交
  9. 20 7月, 2016 1 次提交
  10. 13 7月, 2016 2 次提交
  11. 17 6月, 2016 1 次提交
  12. 07 6月, 2016 2 次提交
  13. 06 6月, 2016 1 次提交
  14. 29 5月, 2016 5 次提交
    • P
      scsi-block: always use SG_IO · 8fdc7839
      Paolo Bonzini 提交于
      Using pread/pwrite or io_submit has the advantage of eliminating the
      bounce buffer, but drops the SCSI status.  This keeps the guest from
      seeing unit attention codes, as well as statuses such as RESERVATION
      CONFLICT.  Because we know scsi-block operates on an SBC device we can
      still use the DMA helpers with SG_IO; just remember to patch the CDBs
      if the transfer is split into multiple segments.
      
      This means that scsi-block will always use the thread-pool unfortunately,
      instead of respecting aio=native.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      8fdc7839
    • P
      scsi-disk: introduce scsi_disk_req_check_error · 5b956f41
      Paolo Bonzini 提交于
      Commonize all the checks for canceled requests and errors.  The next patch
      will add another case to check for, in order to handle passthrough commands.
      
      There is no semantic change here; the only nontrivial modification is in
      scsi_write_do_fua, where cancellation has been checked earlier by both
      callers.  Thus, the check is replaced with an assertion.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      5b956f41
    • P
      scsi-disk: add need_fua_emulation to SCSIDiskClass · 94f8ba11
      Paolo Bonzini 提交于
      scsi-block will be able to do FUA just by passing the request through
      to the LUN (which is also more efficient); there is no need to emulate
      it like we do for scsi-disk.
      
      Add a new method to distinguish this.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      94f8ba11
    • P
      scsi-disk: introduce dma_readv and dma_writev · fcaafb10
      Paolo Bonzini 提交于
      These are replacements for blk_aio_readv and blk_aio_writev that allow
      customization of the data path.  They reuse the DMA helpers' DMAIOFunc
      callback type, so that the same function can be used in either the
      QEMUSGList or the bounce-buffered case.
      
      This customization will be needed in the next patch to do zero-copy
      SG_IO on scsi-block.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      fcaafb10
    • P
      scsi-disk: introduce a common base class · 993935f3
      Paolo Bonzini 提交于
      This will be the place to add DMAIOFuncs in the next patch.  There
      are also a couple DeviceClass members that can be moved to the
      abstract class's initialization function.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      993935f3
  15. 26 5月, 2016 2 次提交
  16. 12 5月, 2016 2 次提交
  17. 23 3月, 2016 2 次提交
    • V
      util: move declarations out of qemu-common.h · f348b6d1
      Veronia Bahaa 提交于
      Move declarations out of qemu-common.h for functions declared in
      utils/ files: e.g. include/qemu/path.h for utils/path.c.
      Move inline functions out of qemu-common.h and into new files (e.g.
      include/qemu/bcd.h)
      Signed-off-by: NVeronia Bahaa <veroniabahaa@gmail.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      f348b6d1
    • 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
  18. 09 2月, 2016 2 次提交
  19. 29 1月, 2016 1 次提交
  20. 12 11月, 2015 1 次提交
  21. 04 11月, 2015 1 次提交
  22. 15 8月, 2015 1 次提交
  23. 30 7月, 2015 2 次提交
  24. 24 7月, 2015 1 次提交
    • M
      scsi: Handle no media case for scsi_get_configuration · 7d99f4c1
      Matthew Rosato 提交于
      Currently, scsi_get_configuration always returns a current
      profile (DVD or CD), even when there is actually no media present.
      By comparison, ide/atapi uses a default profile of 0 (MMC_PROFILE_NONE)
      for this case and checks for tray_open, so let's do the same for scsi.
      
      This fixes a problem I'm seeing with Fedora 22 guests where systemd
      cdrom_id fails to unmount after a QEMU-initiated eject against a
      scsi cdrom device because it believes the media is still present
      (but unreadable).
      Signed-off-by: NMatthew Rosato <mjrosato@linux.vnet.ibm.com>
      Message-Id: <1436986352-10695-1-git-send-email-mjrosato@linux.vnet.ibm.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      7d99f4c1
  25. 10 3月, 2015 2 次提交