From: Paolo Bonzini <pbonzini@redhat.com>
To: Boaz Harrosh <bharrosh@panasas.com>
Cc: Wang Sen <senwang@linux.vnet.ibm.com>,
linux-scsi@vger.kernel.org, JBottomley@parallels.com,
stefanha@linux.vnet.ibm.com, mc@linux.vnet.ibm.com,
linux-kernel@vger.kernel.org,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
Rusty Russell <rusty@rustcorp.com.au>
Subject: Re: virtio(-scsi) vs. chained sg_lists (was Re: [PATCH] scsi: virtio-scsi: Fix address translation failure of HighMem pages used by sg list)
Date: Wed, 25 Jul 2012 19:43:31 +0200 [thread overview]
Message-ID: <50103043.5050508@redhat.com> (raw)
In-Reply-To: <50101091.5090909@panasas.com>
Il 25/07/2012 17:28, Boaz Harrosh ha scritto:
>> 1) what I get is a scsi_cmnd which contains an N-element scatterlist.
>>
>> 2) virtio-scsi has to build the "packet" that is passed to the hardware
>> (it does not matter that the hardware is virtual). This packet (per
>> virtio-scsi spec) has an N+1-element scatterlist, where the first
>> element is a request descriptor (struct virtio_scsi_cmd_req), and the
>> others describe the written data.
>
> Then "virtio-scsi spec" is crap. It overloads the meaning of
> "struct scatterlist" of the first element in an array. to be a
> "struct virtio_scsi_cmd_req".
What the holy fuck? The first element simply _points_ to the "struct
virtio_scsi_cmd_req", just like subsequent elements point to the data.
And the protocol of the device is _not_ a struct scatterlist[]. The
virtio _API_ takes that array and converts to a series of physical
address + offset pairs.
> Since you need to change the standard to support chaining then
> it is a good time to fix this.
Perhaps it is a good time for you to read the virtio spec. You are
making a huge confusion between the LLD->virtio interface and the
virtio->hardware interface. I'm talking only of the former.
>> 3) virtio takes care of converting the "packet" from a scatterlist
>> (which currently must be a flat one) to the hardware representation.
>> Here a walk is inevitable, so we don't care about this walk.
>
> "hardware representation" you mean aio or biovec, what ever the
> IO submission path uses at the host end?
No, I mean the way the virtio spec encodes the physical address + offset
pairs.
I stopped reading here.
Paolo
next prev parent reply other threads:[~2012-07-25 17:44 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-25 8:29 [PATCH] scsi: virtio-scsi: Fix address translation failure of HighMem pages used by sg list Wang Sen
2012-07-25 8:44 ` Paolo Bonzini
2012-07-25 9:22 ` Boaz Harrosh
2012-07-25 9:41 ` Paolo Bonzini
2012-07-25 12:34 ` Boaz Harrosh
2012-07-25 12:49 ` Paolo Bonzini
2012-07-25 13:26 ` Boaz Harrosh
2012-07-25 13:36 ` Paolo Bonzini
2012-07-25 14:36 ` Boaz Harrosh
2012-07-25 15:09 ` performance improvements for the sglist API (Re: [PATCH] scsi: virtio-scsi: Fix address translation failure of HighMem pages used by sg list) Paolo Bonzini
2012-07-25 15:16 ` Paolo Bonzini
2012-07-25 14:17 ` virtio(-scsi) vs. chained sg_lists (was " Paolo Bonzini
2012-07-25 15:28 ` Boaz Harrosh
2012-07-25 17:43 ` Paolo Bonzini [this message]
2012-07-25 19:16 ` Boaz Harrosh
2012-07-25 20:06 ` Paolo Bonzini
2012-07-25 21:04 ` Boaz Harrosh
2012-07-26 7:23 ` Paolo Bonzini
2012-07-26 7:56 ` Boaz Harrosh
2012-07-26 7:58 ` Paolo Bonzini
2012-07-26 13:05 ` Paolo Bonzini
2012-07-27 6:27 ` Rusty Russell
2012-07-27 8:11 ` Paolo Bonzini
2012-07-29 23:50 ` Rusty Russell
2012-07-30 7:12 ` Paolo Bonzini
2012-07-30 8:56 ` Boaz Harrosh
2012-07-25 10:41 ` [PATCH] scsi: virtio-scsi: Fix address translation failure of HighMem pages used by sg list Stefan Hajnoczi
2012-07-25 11:48 ` Sen Wang
2012-07-25 11:44 ` Sen Wang
2012-07-25 12:40 ` Boaz Harrosh
2012-07-27 3:12 ` Wang Sen
2012-07-27 6:50 ` Paolo Bonzini
2012-07-25 10:04 ` Rolf Eike Beer
2012-07-25 11:46 ` Sen Wang
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=50103043.5050508@redhat.com \
--to=pbonzini@redhat.com \
--cc=JBottomley@parallels.com \
--cc=bharrosh@panasas.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mc@linux.vnet.ibm.com \
--cc=rusty@rustcorp.com.au \
--cc=senwang@linux.vnet.ibm.com \
--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).