qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Hannes Reinecke <hare@suse.de>,
	Stefan Haynoczi <stefanha@linux.vnet.ibm.com>,
	kvm@vger.kernel.org, Alexander Graf <agraf@suse.de>
Subject: [Qemu-devel] [PATCH 0/3] [v4] Megasas HBA emulation
Date: Fri,  1 Jul 2011 09:42:49 +0200	[thread overview]
Message-ID: <1309506172-17762-1-git-send-email-hare@suse.de> (raw)

Hi all,

thanks to Paolo and Stefan most of the SCSI patches are now in, so
I've made the next attempt of submitting my Megaraid SAS HBA emulation.

To do so, I've done two additional patches, both should be valid cleanups.

- Replace 'tag' by 'hba_private'
  The SCSIRequest structure has a 'tag', which is being used by the
  drivers to match the SCSIRequest to the internal request structure.
  The only driver actually to benefit from this is the lsi53c895a
  driver, everyone else either leaves it blank or uses some internal
  numberting here.
  So this patch converts the 'tag' to a 'hba_private' pointer, which
  allows the driver to store a pointer to the internal structure
  directly within the SCSIRequest. This saves the lookup and an
  additional field in the driver internal request structure.
- Add an 'offset' parameter to iov_to_buf()
  iov_from_buf() has it, but iov_to_buf() has it not. But we'll be
  needing it if the iovec is larger than the buffer. So there.

And, of course, the megasas driver itself. Which has been modified
to work with the new interface; otherwise there have been no changes
to the previous submission.

Hannes Reinecke (3):
  iov: Add 'offset' parameter to iov_to_buf()
  scsi: replace 'tag' with 'hba_private' pointer
  megasas: LSI Megaraid SAS emulation

 Makefile.objs           |    1 +
 default-configs/pci.mak |    1 +
 hw/esp.c                |    2 +-
 hw/lsi53c895a.c         |   17 +-
 hw/megasas.c            | 1923 +++++++++++++++++++++++++++++++++++++++++++++++
 hw/mfi.h                | 1197 +++++++++++++++++++++++++++++
 hw/pci_ids.h            |    3 +-
 hw/scsi-bus.c           |   22 +-
 hw/scsi-disk.c          |    5 +-
 hw/scsi-generic.c       |    4 +-
 hw/scsi.h               |    8 +-
 hw/spapr_vscsi.c        |   41 +-
 hw/usb-msd.c            |   10 +-
 hw/virtio-net.c         |    2 +-
 hw/virtio-serial-bus.c  |    2 +-
 iov.c                   |   23 +-
 iov.h                   |    2 +-
 trace-events            |   14 +-
 18 files changed, 3193 insertions(+), 84 deletions(-)
 create mode 100644 hw/megasas.c
 create mode 100644 hw/mfi.h

             reply	other threads:[~2011-07-01  7:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-01  7:42 Hannes Reinecke [this message]
2011-07-01  7:42 ` [Qemu-devel] [PATCH 1/3] iov: Add 'offset' parameter to iov_to_buf() Hannes Reinecke
2011-07-01  7:42   ` [Qemu-devel] [PATCH 2/3] scsi: replace 'tag' with 'hba_private' pointer Hannes Reinecke
2011-07-01  7:42     ` [Qemu-devel] [PATCH 3/3] megasas: LSI Megaraid SAS emulation Hannes Reinecke
2011-07-01  9:16       ` Alexander Graf
2011-07-03  8:09         ` Michael S. Tsirkin
2011-07-01  8:27     ` [Qemu-devel] [PATCH 2/3] scsi: replace 'tag' with 'hba_private' pointer Paolo Bonzini
2011-07-01  8:57       ` Hannes Reinecke
2011-07-01 13:11       ` Hannes Reinecke
2011-07-01 14:33         ` Paolo Bonzini
2011-07-01  8:02   ` [Qemu-devel] [PATCH 1/3] iov: Add 'offset' parameter to iov_to_buf() Alexander Graf
2011-07-01  8:07     ` Hannes Reinecke
2011-07-01  8:11       ` Alexander Graf
2011-07-01  8:03   ` Paolo Bonzini
2011-07-01  8:04     ` Hannes Reinecke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1309506172-17762-1-git-send-email-hare@suse.de \
    --to=hare@suse.de \
    --cc=agraf@suse.de \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).