qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 00/15] Megasas HBA emulation and SCSI update v.3
@ 2010-11-24 11:15 Hannes Reinecke
  2010-11-24 11:15 ` [Qemu-devel] [PATCH 01/15] scsi: Increase the number of possible devices Hannes Reinecke
                   ` (16 more replies)
  0 siblings, 17 replies; 38+ messages in thread
From: Hannes Reinecke @ 2010-11-24 11:15 UTC (permalink / raw)
  To: qemu-devel; +Cc: stefanha, nab, kraxel

The is the third version of the megasas patchset; changes are:
v2 -> v3:
- Include review by Stefan Hajnoczi
- Return SCSI error status on invalid data direction
- Initialize sense code in scsi-generic.c

v1 -> v2:
- Include suggestions (and acked-by) from Christoph Hellwig
- Updated patch description as requested by Gerd Hoffman
- Use generic iov_size() implementation
- Drop old patches
- Make SCSI HBA configurable

This patchset can be found at

git://repo.or.cz/qemu/megasas.git
branch megasas.v3

The original description was:
Due to popular demand here is now the LSI Megaraid HBA emulation.
And an update to the SCSI stack to bring it more in line with
modern standards.

For the SCSI update there are three key points:
- Improved sense code handling: the SCSI standard specifies several
  sense codes to be returned on common errors; we should be following
  that.
- Reworked SCSI layer: Instead of indirectly addressing a SCSI
  request by an abstract 'tag' we're now using the request directly,
  thus saving us a lookup on every invocation.
- Add iovec passing: I've added an interface to pass an iovec
  to a SCSI request, so that we don't need to use bounce buffers
  for data transfer. The old interface is left in place.

And, of course, the megasas driver itself.

A quick 'dd' comparison against virtio on a tmpfs backed sparse file shows:

# dd if=/dev/sdb of=/dev/null bs=16M count=1000 iflag=direct
1000+0 records in
1000+0 records out
16777216000 bytes (17 GB) copied, 9.40123 s, 1.8 GB/s
# dd if=/dev/vda of=/dev/null bs=16M count=1000 iflag=direct
1000+0 records in
1000+0 records out
16777216000 bytes (17 GB) copied, 7.44681 s, 2.3 GB/s

So we're having about 80% virtio speed.
Unoptimized :-)

Hannes Reinecke (15):
  scsi: Increase the number of possible devices
  scsi: Return SAM status codes
  scsi: INQUIRY VPD fixes
  scsi: Move sense handling into the driver
  scsi-disk: Remove duplicate cdb parsing
  scsi: Update sense code handling
  lsi53c895a: Rename 'sense' to 'status'
  scsi-disk: Allocate iovec dynamically
  scsi: Use 'SCSIRequest' directly
  scsi-disk: add data direction checking
  Remove 'bus' argument from SCSI command completion callbacks
  scsi: Implement 'get_sense' callback
  scsi: Implement alloc_req_iov callback
  megasas: LSI Megaraid SAS emulation
  Make SCSI HBA configurable

 Makefile.objs                        |    5 +-
 blockdev.h                           |    2 +-
 default-configs/i386-softmmu.mak     |    2 +
 default-configs/mips-softmmu.mak     |    2 +-
 default-configs/mips64-softmmu.mak   |    2 +-
 default-configs/mips64el-softmmu.mak |    2 +-
 default-configs/mipsel-softmmu.mak   |    2 +-
 default-configs/ppc-softmmu.mak      |    2 +
 default-configs/ppc64-softmmu.mak    |    2 +
 default-configs/ppcemb-softmmu.mak   |    2 +
 default-configs/sparc-softmmu.mak    |    2 +-
 default-configs/sparc64-softmmu.mak  |    2 +
 default-configs/x86_64-softmmu.mak   |    2 +
 hw/esp.c                             |   23 +-
 hw/lsi53c895a.c                      |   47 +-
 hw/megasas.c                         | 1828 ++++++++++++++++++++++++++++++++++
 hw/mfi.h                             | 1197 ++++++++++++++++++++++
 hw/pci_ids.h                         |    2 +
 hw/scsi-bus.c                        |  120 ++-
 hw/scsi-defs.h                       |   20 +-
 hw/scsi-disk.c                       |  459 +++++-----
 hw/scsi-generic.c                    |  239 +++--
 hw/scsi.h                            |   65 +-
 hw/usb-msd.c                         |   26 +-
 24 files changed, 3618 insertions(+), 437 deletions(-)
 create mode 100644 hw/megasas.c
 create mode 100644 hw/mfi.h

^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2010-12-21 12:01 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-24 11:15 [Qemu-devel] [PATCH 00/15] Megasas HBA emulation and SCSI update v.3 Hannes Reinecke
2010-11-24 11:15 ` [Qemu-devel] [PATCH 01/15] scsi: Increase the number of possible devices Hannes Reinecke
2010-11-24 11:15 ` [Qemu-devel] [PATCH 02/15] scsi: Return SAM status codes Hannes Reinecke
2010-11-24 16:51   ` Christoph Hellwig
2010-11-24 11:15 ` [Qemu-devel] [PATCH 03/15] scsi: INQUIRY VPD fixes Hannes Reinecke
2010-11-24 11:15 ` [Qemu-devel] [PATCH 04/15] scsi: Move sense handling into the driver Hannes Reinecke
2010-11-24 11:16 ` [Qemu-devel] [PATCH 05/15] scsi-disk: Remove duplicate cdb parsing Hannes Reinecke
2010-11-24 11:16 ` [Qemu-devel] [PATCH 06/15] scsi: Update sense code handling Hannes Reinecke
2010-11-25 14:33   ` Kevin Wolf
2010-12-21 11:56     ` Hannes Reinecke
2010-11-24 11:16 ` [Qemu-devel] [PATCH 07/15] lsi53c895a: Rename 'sense' to 'status' Hannes Reinecke
2010-11-24 11:16 ` [Qemu-devel] [PATCH 08/15] scsi-disk: Allocate iovec dynamically Hannes Reinecke
2010-11-24 11:16 ` [Qemu-devel] [PATCH 09/15] scsi: Use 'SCSIRequest' directly Hannes Reinecke
2010-11-24 11:16 ` [Qemu-devel] [PATCH 10/15] scsi-disk: add data direction checking Hannes Reinecke
2010-11-24 11:16 ` [Qemu-devel] [PATCH 11/15] Remove 'bus' argument from SCSI command completion callbacks Hannes Reinecke
2010-11-24 11:16 ` [Qemu-devel] [PATCH 12/15] scsi: Implement 'get_sense' callback Hannes Reinecke
2010-11-24 11:16 ` [Qemu-devel] [PATCH 13/15] scsi: Implement alloc_req_iov callback Hannes Reinecke
2010-11-24 16:52   ` Christoph Hellwig
2010-11-25  8:53     ` Hannes Reinecke
2010-11-25 15:29       ` Christoph Hellwig
2010-11-25 16:21         ` Hannes Reinecke
2010-11-26  0:06           ` Paul Brook
2010-11-24 11:16 ` [Qemu-devel] [PATCH 14/15] megasas: LSI Megaraid SAS emulation Hannes Reinecke
2010-11-25 14:36   ` [Qemu-devel] " Stefan Hajnoczi
2010-11-25 14:50     ` Hannes Reinecke
2010-11-25 14:52       ` Stefan Hajnoczi
2010-11-25 20:47   ` Sebastian Herbszt
2010-12-21 12:06     ` Hannes Reinecke
2010-11-24 11:16 ` [Qemu-devel] [PATCH 15/15] Make SCSI HBA configurable Hannes Reinecke
2010-11-24 16:50 ` [Qemu-devel] [PATCH 00/15] Megasas HBA emulation and SCSI update v.3 Christoph Hellwig
2010-12-10 22:14   ` [Qemu-devel] " Paolo Bonzini
2010-12-13  7:32     ` Hannes Reinecke
2010-12-16  1:45       ` Benjamin Herrenschmidt
2010-12-16  1:48         ` Benjamin Herrenschmidt
2010-12-16  8:34         ` Stefan Hajnoczi
2010-12-16 14:58         ` Kevin Wolf
2010-12-20 14:59 ` [Qemu-devel] " Christoph Hellwig
2010-12-20 15:25   ` Hannes Reinecke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).