because we need it for TEST_UNIT_READY
and other non DATA I/O descriptors in lsi_do_msgin().
Tested with Linux x86_64 v2.6.26 KVM guest with hw/scsi-generic.c with
TCM_Loop FILEIO backstores on a v2.6.35 KVM / TCM v4 host.
Signed-off-by: Nicholas A. Bellinger
---
hw/lsi5
Hi Asias!
On Sun, 2013-01-06 at 14:36 +0800, Asias He wrote:
> This drops the cmd completion list spin lock and makes the cmd
> completion queue lock-less.
>
> Signed-off-by: Asias He
> ---
Apologies for the long delay to get back to this patch.
After some initial testing, I'm seeing about abo
Hi MST & Co,
On Thu, 2013-01-17 at 18:43 +0200, Michael S. Tsirkin wrote:
> On Fri, Sep 07, 2012 at 06:48:14AM +, Nicholas A. Bellinger wrote:
> > From: Nicholas Bellinger
> >
> > Hello Anthony & Co,
> >
> > This is the fourth installment to add ho
Hi MST & Paolo,
So I'm currently working on vhost-scsi support for ANY_LAYOUT, and
wanted to verify some assumptions based upon your earlier emails..
*) When ANY_LAYOUT is negotiated by vhost-scsi, it's expected that
virtio-scsi request + response headers will (always..?) be within a
single iovec
From: Nicholas Bellinger
Signal support of VIRTIO_F_ANY_LAYOUT + VIRTIO_F_VERSION_1 feature bits
required for virtio-scsi 1.0 spec layout requirements.
Cc: Michael S. Tsirkin
Cc: Paolo Bonzini
Signed-off-by: Nicholas Bellinger
---
drivers/vhost/scsi.c | 9 +++--
1 file changed, 7 inserti
From: Nicholas Bellinger
Required for ANY_LAYOUT support when the incoming virtio-scsi response
header + fixed size sense buffer payload may span more than a single
iovec entry.
This changes existing code to save cmd->tvc_resp_iod instead of the
first single iovec base pointer from &vq->iov[out]
From: Nicholas Bellinger
This patch adds ANY_LAYOUT prerequisites logic for accepting a set of
protection + data payloads via iovec + offset. Also includes helpers
for calcuating SGLs + invoking vhost_scsi_map_to_sgl() with a known
number of iovecs.
Required by ANY_LAYOUT processing when struct
From: Nicholas Bellinger
Hi MST & Paolo,
The series adds initial vhost/scsi ANY_LAYOUT layout support.
It assumes request/CDB and response/sense_buffer headers may span more
than a single iovec using lib/iovec.c logic, along with a new addition
of memcpy_fromiovec_out() to return the current re
From: Nicholas Bellinger
This patch adds a new memcpy_fromiovec_out() library function which modifies
the passed *iov following memcpy_fromiovec(), but also returns the next current
iovec pointer via **iov_out.
This is useful for vhost ANY_LAYOUT support when guests are allowed to generate
incom
From: Nicholas Bellinger
This patch changes vhost_scsi_map_to_sgl() parameters to accept virtio
iovec ptr + len when determing pages_nr.
This is currently done with iov_num_pages() -> PAGE_ALIGN, so allow
the same parameters as well.
Cc: Michael S. Tsirkin
Cc: Paolo Bonzini
Signed-off-by: Nic
From: Nicholas Bellinger
This patch adds initial ANY_LAYOUT support with a new vhost_virtqueue
callback in vhost_scsi_handle_vqal().
It calculates data_direction + exp_data_len for the new tcm_vhost_cmd
descriptor by walking both outgoing + incoming iovecs, assuming the
layout of outgoing reques
From: Nicholas Bellinger
This patch fixes vhost_scsi_handle_vq() failure cases that result in BUG_ON()
getting triggered when vhost_scsi_free_cmd() is called, and ->tvc_se_cmd has
not been initialized by target_submit_cmd_map_sgls().
It changes tcm_vhost_release_cmd() to use tcm_vhost_cmd->tvc_n
From: Nicholas Bellinger
Move logic for typical vhost_scsi_handle_vq() -> tcm_vhost_workqueue ->
tcm_vhost_submission_work() dispatch into vhost_scsi_queue_desc().
Can be shared by vhost_scsi_handle_vqal() code.
Cc: Michael S. Tsirkin
Cc: Paolo Bonzini
Signed-off-by: Nicholas Bellinger
---
From: Nicholas Bellinger
Signed-off-by: Nicholas Bellinger
---
hw/scsi/vhost-scsi.c| 1 +
hw/scsi/virtio-scsi.c | 3 +++
hw/virtio/virtio-pci.c | 2 ++
include/hw/i386/pc.h| 13 -
include/hw/virtio/virtio-scsi.h | 5 -
5 files chang
From: Nicholas Bellinger
Hi MST & Paolo,
Here are the associated QEMU vhost/scsi changes to enable KVM host
for expose F_HOTPLUG, F_T10_PI, and ANY_LAYOUT feature bits into
virtio 1.0 compatible guests.
Note this does not include VIRTIO_SCSI_F_CHANGE, which is currently
not supported by vhost/s
From: Nicholas Bellinger
Signed-off-by: Nicholas Bellinger
---
hw/scsi/vhost-scsi.c | 1 +
hw/virtio/virtio-pci.c | 2 ++
include/hw/i386/pc.h | 5 +
3 files changed, 8 insertions(+)
diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c
index 95f7b99..bfb7005 100644
--- a/hw/scsi/vh
From: Nicholas Bellinger
Cc: Michael S. Tsirkin
Cc: Paolo Bonzini
Signed-off-by: Nicholas Bellinger
---
hw/virtio/virtio-pci.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index dde1d73..5127efb 100644
--- a/hw/virtio/virtio-pci.c
+++ b
On Fri, 2015-01-30 at 10:33 +0100, Paolo Bonzini wrote:
>
> On 30/01/2015 09:12, Nicholas A. Bellinger wrote:
> > From: Nicholas Bellinger
> >
> > This patch adds a new memcpy_fromiovec_out() library function which modifies
> > the passed *iov following memcpy_fro
On Fri, 2015-01-30 at 12:51 +0200, Michael S. Tsirkin wrote:
> On Fri, Jan 30, 2015 at 08:12:28AM +0000, Nicholas A. Bellinger wrote:
> > From: Nicholas Bellinger
> >
> > This patch changes vhost_scsi_map_to_sgl() parameters to accept virtio
> > iovec ptr +
From: Nicholas Bellinger
This patch adds ANY_LAYOUT prerequisites logic for accepting a set of
protection + data payloads via iovec + offset. Also includes helpers
for calcuating SGLs + invoking vhost_scsi_map_to_sgl() with a known
number of iovecs.
Required by ANY_LAYOUT processing when struct
From: Nicholas Bellinger
Required for ANY_LAYOUT support when the incoming virtio-scsi response
header + fixed size sense buffer payload may span more than a single
iovec entry.
This changes existing code to save cmd->tvc_resp_iod instead of the
first single iovec base pointer from &vq->iov[out]
From: Nicholas Bellinger
With the new ANY_LAYOUT logic in place for vhost_scsi_handle_vqal(),
there is no longer a reason to keep around the legacy code with
!ANY_LAYOUT assumptions.
Go ahead and drop the pre virtio 1.0 logic in vhost_scsi_handle_vq()
and associated helpers.
Cc: Michael S. Tsir
From: Nicholas Bellinger
This patch fixes vhost_scsi_handle_vq() failure cases that result in BUG_ON()
getting triggered when vhost_scsi_free_cmd() is called, and ->tvc_se_cmd has
not been initialized by target_submit_cmd_map_sgls().
It changes tcm_vhost_release_cmd() to use tcm_vhost_cmd->tvc_n
From: Nicholas Bellinger
Hi MST, Paolo, & Co,
This -v2 series adds vhost/scsi ANY_LAYOUT + VERSION_1 host feature bit
support.
It adds a new vhost_virtqueue ->handle_kick() callback to determine the
start of protection and data payloads iovecs past starting virtio-scsi
request and response head
From: Nicholas Bellinger
This patch adds a new memcpy_fromiovec_out() library function which modifies
the passed *iov following memcpy_fromiovec(), but also returns the next current
iovec pointer via **iov_out.
This is useful for vhost ANY_LAYOUT support when guests are allowed to generate
incom
From: Nicholas Bellinger
With the recent removal of MSG_*_TAG defines in commit 68d81f40,
vhost-scsi is now using TCM_*_TAG and doesn't depend upon host
side scsi_tcq.h definitions anymore.
Cc: Michael S. Tsirkin
Cc: Paolo Bonzini
Signed-off-by: Nicholas Bellinger
---
drivers/vhost/scsi.c |
From: Nicholas Bellinger
This patch adds a vhost_skip_iovec_bytes() helper for skipping ahead
a number of bytes into the passed *iov_in + off_in, saving the current
**iov_out + off_out so it may be used by the caller.
This is useful for virtio-scsi READs when needing to skip ahead of
the startin
From: Nicholas Bellinger
There is a large amount of code that still references the original
'tcm_vhost' naming conventions, instead of modern 'vhost_scsi'.
Go ahead and do a global rename to make the usage consistent.
Cc: Michael S. Tsirkin
Cc: Paolo Bonzini
Signed-off-by: Nicholas Bellinger
From: Nicholas Bellinger
Signal support of VIRTIO_F_ANY_LAYOUT + VIRTIO_F_VERSION_1 feature bits
required for virtio-scsi 1.0 spec layout requirements.
Cc: Michael S. Tsirkin
Cc: Paolo Bonzini
Signed-off-by: Nicholas Bellinger
---
drivers/vhost/scsi.c | 9 +++--
1 file changed, 7 inserti
From: Nicholas Bellinger
This patch adds ANY_LAYOUT support with a new vqs[].vq.handle_kick()
callback in vhost_scsi_handle_vqal().
It calculates data_direction + exp_data_len for the new tcm_vhost_cmd
descriptor by walking both outgoing + incoming iovecs, assuming the
layout of outgoing request
From: Nicholas Bellinger
This patch changes vhost_scsi_map_to_sgl() parameters to accept virtio
iovec ptr + len when determing pages_nr.
This is currently done with iov_num_pages() -> PAGE_ALIGN, so allow
the same parameters as well.
Cc: Michael S. Tsirkin
Cc: Paolo Bonzini
Signed-off-by: Nic
On Mon, 2015-02-02 at 00:15 -0800, Christoph Hellwig wrote:
> Hi Nic,
>
> Al has been rewriting the vhost code to use iov_iter primitives,
> can you please rebase it on top of that istead of using the obsolete
> infrastructure?
>
Yep, already done with the copy_[from,to]_iter() conversion in
vho
On Mon, 2015-02-02 at 14:25 +0800, kbuild test robot wrote:
> tree: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git
> for-next
> head: 2936f1d4f3e8247bd519feba7892371d5e4c6603
> commit: 105acf608f25d5e0d9fef669299a5438b7b114ee [16/21] vhost/scsi: Add
> ANY_LAYOUT vhost_sk
Hi Al,
On Mon, 2015-02-02 at 07:59 +, Al Viro wrote:
> From: Al Viro
>
> it has just verified that it asks no more than the length of the
> first segment of iovec.
>
> And with that the last user of stuff in lib/iovec.c is gone.
> RIP.
>
> Cc: Michael S
From: Nicholas Bellinger
Hi MST, Paolo, Al & Co,
Here is -v3 for adding vhost/scsi ANY_LAYOUT + VERSION_1 host feature
bit support.
It adds a new vhost_virtqueue ->handle_kick() callback to determine the
start of protection and data payloads iovecs past starting virtio-scsi
request and response
From: Nicholas Bellinger
This patch changes vhost_scsi_map_to_sgl() parameters to accept virtio
iovec ptr + len when determing pages_nr.
This is currently done with iov_num_pages() -> PAGE_ALIGN, so allow
the same parameters as well.
Cc: Michael S. Tsirkin
Cc: Paolo Bonzini
Signed-off-by: Nic
From: Nicholas Bellinger
This patch fixes vhost_scsi_handle_vq() failure cases that result in BUG_ON()
getting triggered when vhost_scsi_free_cmd() is called, and ->tvc_se_cmd has
not been initialized by target_submit_cmd_map_sgls().
It changes tcm_vhost_release_cmd() to use tcm_vhost_cmd->tvc_n
From: Nicholas Bellinger
Required for ANY_LAYOUT support when the incoming virtio-scsi response
header + fixed size sense buffer payload may span more than a single
iovec entry.
This changes existing code to save cmd->tvc_resp_iov instead of the
first single iovec base pointer from &vq->iov[out]
From: Nicholas Bellinger
With the new ANY_LAYOUT logic in place for vhost_scsi_handle_vqal(),
there is no longer a reason to keep around the legacy code with
!ANY_LAYOUT assumptions.
Go ahead and drop the pre virtio 1.0 logic in vhost_scsi_handle_vq()
and associated helpers.
Cc: Michael S. Tsir
From: Nicholas Bellinger
This patch adds ANY_LAYOUT support with a new vqs[].vq.handle_kick()
callback in vhost_scsi_handle_vqal().
It calculates data_direction + exp_data_len for the new tcm_vhost_cmd
descriptor by walking both outgoing + incoming iovecs using iov_iter,
assuming the layout of o
From: Nicholas Bellinger
Signal support of VIRTIO_F_ANY_LAYOUT + VIRTIO_F_VERSION_1 feature bits
required for virtio-scsi 1.0 spec layout requirements.
Cc: Michael S. Tsirkin
Cc: Paolo Bonzini
Signed-off-by: Nicholas Bellinger
---
drivers/vhost/scsi.c | 9 +++--
1 file changed, 7 inserti
From: Nicholas Bellinger
There is a large amount of code that still references the original
'tcm_vhost' naming conventions, instead of modern 'vhost_scsi'.
Go ahead and do a global rename to make the usage consistent.
Cc: Michael S. Tsirkin
Cc: Paolo Bonzini
Signed-off-by: Nicholas Bellinger
From: Nicholas Bellinger
With the recent removal of MSG_*_TAG defines in commit 68d81f40,
vhost-scsi is now using TCM_*_TAG and doesn't depend upon host
side scsi_tcq.h definitions anymore.
Cc: Michael S. Tsirkin
Cc: Paolo Bonzini
Signed-off-by: Nicholas Bellinger
---
drivers/vhost/scsi.c |
From: Nicholas Bellinger
This patch adds ANY_LAYOUT prerequisites logic for accepting a set of
protection + data payloads via iov_iter. Also includes helpers for
calcuating SGLs + invoking vhost_scsi_map_to_sgl() with a known number
of iovecs.
Required by ANY_LAYOUT processing when struct iovec
On Tue, 2015-02-03 at 11:24 +0200, Michael S. Tsirkin wrote:
>
> On Tue, Feb 03, 2015 at 06:29:55AM +, Nicholas A. Bellinger wrote:
> > From: Nicholas Bellinger
> >
> > Required for ANY_LAYOUT support when the incoming virtio-scsi response
> > header + fixed
On Tue, 2015-02-03 at 11:32 +0200, Michael S. Tsirkin wrote:
> On Tue, Feb 03, 2015 at 06:29:58AM +0000, Nicholas A. Bellinger wrote:
> > From: Nicholas Bellinger
> >
> > This patch adds ANY_LAYOUT prerequisites logic for accepting a set of
> > protection + data p
On Tue, 2015-02-03 at 11:35 +0200, Michael S. Tsirkin wrote:
> On Tue, Feb 03, 2015 at 06:29:54AM +0000, Nicholas A. Bellinger wrote:
> > From: Nicholas Bellinger
> >
> > Hi MST, Paolo, Al & Co,
> >
> > Here is -v3 for adding vhost/scsi ANY_LAYOUT + V
On Tue, 2015-02-03 at 11:37 +0200, Michael S. Tsirkin wrote:
> On Tue, Feb 03, 2015 at 06:30:01AM +0000, Nicholas A. Bellinger wrote:
> > From: Nicholas Bellinger
> >
> > With the new ANY_LAYOUT logic in place for vhost_scsi_handle_vqal(),
> > there is no longer
On Tue, 2015-02-03 at 11:40 +0200, Michael S. Tsirkin wrote:
> On Tue, Feb 03, 2015 at 06:30:00AM +0000, Nicholas A. Bellinger wrote:
> > From: Nicholas Bellinger
> >
> > Signal support of VIRTIO_F_ANY_LAYOUT + VIRTIO_F_VERSION_1 feature bits
> > required for
On Tue, 2015-02-03 at 12:14 +0200, Michael S. Tsirkin wrote:
> On Tue, Feb 03, 2015 at 06:29:59AM +0000, Nicholas A. Bellinger wrote:
> > From: Nicholas Bellinger
> >
> > This patch adds ANY_LAYOUT support with a new vqs[].vq.handle_kick()
> > callback in vhost_scsi
On Tue, 2015-02-03 at 23:56 +, Al Viro wrote:
> On Tue, Feb 03, 2015 at 06:29:59AM +0000, Nicholas A. Bellinger wrote:
> > +* Copy over the virtio-scsi request header, which when
> > +* ANY_LAYOUT is enabled may span multiple iovecs, or a
> > +
On Wed, 2015-02-04 at 11:20 +0100, Michael S. Tsirkin wrote:
> On Wed, Feb 04, 2015 at 02:11:20AM -0800, Nicholas A. Bellinger wrote:
> > On Tue, 2015-02-03 at 23:56 +, Al Viro wrote:
> > > On Tue, Feb 03, 2015 at 06:29:59AM +, Nicholas A. Bellinger wrote:
> > >
On Wed, 2015-02-04 at 10:42 +0100, Michael S. Tsirkin wrote:
> On Wed, Feb 04, 2015 at 01:40:25AM -0800, Nicholas A. Bellinger wrote:
> > > > + /*
> > > > +* Any associated T10_PI bytes for the outgoing /
> > > > incoming
On Wed, 2015-02-04 at 02:41 -0800, Nicholas A. Bellinger wrote:
> On Wed, 2015-02-04 at 10:42 +0100, Michael S. Tsirkin wrote:
> > On Wed, Feb 04, 2015 at 01:40:25AM -0800, Nicholas A. Bellinger wrote:
> > > > > + /*
> > > > > +
From: Nicholas Bellinger
Hi MST, Paolo, Al & Co,
Here is v4 patch series for vhost/scsi ANY_LAYOUT + VERSION_1 support.
It updates vhost_virtqueue->handle_kick() -> vhost_scsi_handle_vq()
callback code to determine the start of protection + data payloads iovecs
past the starting virtio-scsi req
From: Nicholas Bellinger
This patch adds ANY_LAYOUT prerequisites logic for accepting a set of
protection + data payloads via iov_iter. Also includes helpers for
calcuating SGLs + invoking vhost_scsi_map_to_sgl() with a known number
of iovecs.
Required by ANY_LAYOUT processing when struct iovec
From: Nicholas Bellinger
Required for ANY_LAYOUT support when the incoming virtio-scsi response
header + fixed size sense buffer payload may span more than a single
iovec entry.
This changes existing code to save cmd->tvc_resp_iov instead of the
first single iovec base pointer from &vq->iov[out]
From: Nicholas Bellinger
With the recent removal of MSG_*_TAG defines in commit 68d81f40,
vhost-scsi is now using TCM_*_TAG and doesn't depend upon host
side scsi_tcq.h definitions anymore.
Cc: Michael S. Tsirkin
Acked-by: Michael S. Tsirkin
Cc: Paolo Bonzini
Signed-off-by: Nicholas Bellinger
From: Nicholas Bellinger
Signal support of VIRTIO_F_ANY_LAYOUT + VIRTIO_F_VERSION_1 feature bits
required for virtio-scsi 1.0 spec layout requirements.
Cc: Michael S. Tsirkin
Acked-by: Michael S. Tsirkin
Cc: Paolo Bonzini
Signed-off-by: Nicholas Bellinger
---
drivers/vhost/scsi.c | 4 +++-
From: Nicholas Bellinger
This patch fixes vhost_scsi_handle_vq() failure cases that result in BUG_ON()
getting triggered when vhost_scsi_free_cmd() is called, and ->tvc_se_cmd has
not been initialized by target_submit_cmd_map_sgls().
It changes tcm_vhost_release_cmd() to use tcm_vhost_cmd->tvc_n
From: Nicholas Bellinger
This patch adds ANY_LAYOUT compatible support within the existing
vhost_scsi_handle_vq() ->handle_kick() callback.
It calculates data_direction + exp_data_len for the new tcm_vhost_cmd
descriptor by walking both outgoing + incoming iovecs using iov_iter,
assuming the lay
From: Nicholas Bellinger
This patch changes vhost_scsi_map_to_sgl() parameters to accept virtio
iovec ptr + len when determing pages_nr.
This is currently done with iov_num_pages() -> PAGE_ALIGN, so allow
the same parameters as well.
Cc: Michael S. Tsirkin
Cc: Paolo Bonzini
Signed-off-by: Nic
From: Nicholas Bellinger
There is a large amount of code that still references the original
'tcm_vhost' naming conventions, instead of modern 'vhost_scsi'.
Go ahead and do a global rename to make the usage consistent.
Cc: Michael S. Tsirkin
Acked-by: Michael S. Tsirkin
Cc: Paolo Bonzini
Sign
On Thu, 2015-02-05 at 10:37 +0300, Dan Carpenter wrote:
> This code in vhost_scsi_make_tpg() is confusing because we limit "tpgt"
> to UINT_MAX but the data type of "tpg->tport_tpgt" and that is a u16.
>
> I looked at the context and it turns out that in
> vhost_scsi_set_endpoint(), "tpg->tport_tp
301 - 364 of 364 matches
Mail list logo