kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Hannes Reinecke <hare@suse.de>
Cc: kvm@vger.kernel.org, qemu-devel@nongnu.org,
	virtualization@lists.linux-foundation.org
Subject: Re: [Qemu-devel] [PATCH 0/4] megaraid_sas HBA emulation
Date: Wed, 28 Oct 2009 11:54:31 +0100	[thread overview]
Message-ID: <4AE822E7.2010108@redhat.com> (raw)
In-Reply-To: <20091028091129.n46xqd1lww8oosc8@imap.suse.de>

   Hi,

>>> In order to support SCSI command emulation I had to update /
>>> patch up the existing SCSI disk support. This might be
>>> not to everyones taste, so I'm open to alternative
>>> suggestions.
>>>
>>> But I certainly do _not_ want to update the SCSI disk
>>> emulation, as this is really quite tied to the SCSI parallel
>>> interface used by the old lsi53c895a.c.
>>
>> --verbose please. I'd prefer to fix scsi-disk bugs and/or limitations
>> instead of working around them.
>>
> The problem is I don't have any documentation for the LSI parallel
> SCSI controller. So I don't know if and in what shape I/O is passed
> down, nor anything else.

[ after briefly checking the code ]

Hmm.  Data is passed back+forth between scsi-device and scsi-adapter 
using a bounce buffer per request and a amazing maze of callbacks ...

That interface needs some serious rework, so we have a chance to kill 
the memcpy() and use iovecs.

> And as the SCSI disk emulation is really
> tied into the LSI parallel SCSI controller, any change in the former
> is likely to break the latter.

Not really.

> And what with me no way of fixing it. Hence I decided on this approach.

 From a really quick view fixing up the data xfer code paths doesn't 
look too bad.  Think I'll give it a try.

>>> Plus it doesn't do scatter-gather list handling,
>>
>> Which should be fixed anyway.
>>
> Quite. But as I said, the LSI parallel SCSI controller is going to
> suffer.

Don't think so.  Even if scsi-disk *supports* scatter lists, lsi isn't 
forced to actually use that.  I think we'll need a bounce-buffer mode 
anyway for usb-msd because it streams the scsi data in tons of small 
packets over usb ...

cheers,
   Gerd


  parent reply	other threads:[~2009-10-28 10:54 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-27 15:26 [PATCH 0/4] megaraid_sas HBA emulation Hannes Reinecke
2009-10-27 16:47 ` [Qemu-devel] " Gerd Hoffmann
2009-10-28  8:11   ` Hannes Reinecke
2009-10-28  8:20     ` Avi Kivity
2009-10-28  8:40     ` Christoph Hellwig
2009-10-28 10:54     ` Gerd Hoffmann [this message]
2009-10-28 13:58       ` Gerd Hoffmann
2009-10-28 19:25         ` Hannes Reinecke
2009-10-29  4:37           ` Christoph Hellwig
2009-10-29  8:47             ` Gerd Hoffmann
2009-10-29 12:57             ` Gerd Hoffmann
2009-10-29 14:57               ` Christoph Hellwig
2009-10-29 15:14                 ` Anthony Liguori
2009-10-29 15:15                   ` Christoph Hellwig
2009-10-29 15:25                     ` Anthony Liguori
2009-10-30  8:55                       ` Gerd Hoffmann
2009-10-30  8:12               ` Hannes Reinecke
2009-11-03 21:03                 ` Gerd Hoffmann
2009-11-11  1:49 ` Paul Brook

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=4AE822E7.2010108@redhat.com \
    --to=kraxel@redhat.com \
    --cc=hare@suse.de \
    --cc=kvm@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    --cc=virtualization@lists.linux-foundation.org \
    /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).