All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH-v3 0/9] vhost/scsi: Add ANY_LAYOUT + VERSION_1 support
@ 2015-02-03  6:29 Nicholas A. Bellinger
  2015-02-03  6:29 ` [PATCH-v3 1/9] vhost/scsi: Convert completion path to use copy_to_iser Nicholas A. Bellinger
                   ` (9 more replies)
  0 siblings, 10 replies; 37+ messages in thread
From: Nicholas A. Bellinger @ 2015-02-03  6:29 UTC (permalink / raw)
  To: target-devel
  Cc: linux-scsi, kvm-devel, Paolo Bonzini, Michael S. Tsirkin,
	Al Viro, Christoph Hellwig, Nicholas Bellinger

From: Nicholas Bellinger <nab@linux-iscsi.org>

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 headers, based upon data_direction using iov_iter
primitives.

It assumes request/CDB and response/sense_buffer headers may span more
than a single iovec using mm/iov_iter.c logic.

It also allows virtio-scsi headers + T10_PI + Data SGL payloads to span
the same iovec when pinning user-space memory via get_user_pages_fast()
code.  (Not tested yet)

Based upon Al & HCH's feedback, the patch series has been converted to
use copy_*_iter() for virtio-scsi header copy.  Also, patch #4 has been
updated to use iov_iter_npages() for sgl_count, and patch #5 updated to
use iov_iter_advance() for calculating prot_bytes offset to the start
of data_iter.

v3 changelog:
  - Convert memcpy_toiovecend -> copy_to_iter usage
  - Update vhost_scsi_mapal + friends to use iov_iter
  - Move iov_iter sanity checks into vhost_scsi_calc_sgls
  - Convert vhost_scsi_calc_sgls() to iov_iter_npages()
  - Convert to vhost_scsi_handle_vqal to copy_from_iter usage
  - Update vhost_scsi_handle_vqal comments for iov_iter usage
  - Convert prot_bytes offset to use iov_iter_advance
  - Drop max_niov usage in vhost_scsi_handle_vqal
  - Drop vhost_skip_iovec_bytes in favour of iov_iter

Note the one part that has been left unchanged is vhost_scsi_map_to_sgl()
into get_user_pages_fast(), for which existing iov_iter_get_pages() code
will need to allow for a callback to perform the associated scatterlists
setup from **pages for protection + data payloads.

It's functioning against v3.19-rc1 virtio-scsi LLD in T10_PI mode using
TYPE-1 DIF with ANY_LAYOUT -> VERSION_1 guest feature bits enabled, using
the layout following existing convention with protection/data SGL payloads
residing within seperate iovecs.

Also included in patch #9 is an over-due change to rename code in scsi.c
to line up with modern vhost_scsi naming convention.

Please review.

Thank you,

Nicholas Bellinger (9):
  vhost/scsi: Convert completion path to use copy_to_iser
  vhost/scsi: Fix incorrect early vhost_scsi_handle_vq failures
  vhost/scsi: Change vhost_scsi_map_to_sgl to accept iov ptr + len
  vhost/scsi: Add ANY_LAYOUT iov -> sgl mapping prerequisites
  vhost/scsi: Add ANY_LAYOUT vhost_virtqueue callback
  vhost/scsi: Set VIRTIO_F_ANY_LAYOUT + VIRTIO_F_VERSION_1 feature bits
  vhost/scsi: Drop legacy pre virtio v1.0 !ANY_LAYOUT logic
  vhost/scsi: Drop left-over scsi_tcq.h include
  vhost/scsi: Global tcm_vhost -> vhost_scsi rename

 drivers/vhost/scsi.c | 1073 ++++++++++++++++++++++++++------------------------
 1 file changed, 549 insertions(+), 524 deletions(-)

-- 
1.9.1


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

end of thread, other threads:[~2015-02-04 13:16 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-03  6:29 [PATCH-v3 0/9] vhost/scsi: Add ANY_LAYOUT + VERSION_1 support Nicholas A. Bellinger
2015-02-03  6:29 ` [PATCH-v3 1/9] vhost/scsi: Convert completion path to use copy_to_iser Nicholas A. Bellinger
2015-02-03  9:24   ` Michael S. Tsirkin
2015-02-04  8:47     ` Nicholas A. Bellinger
2015-02-03  6:29 ` [PATCH-v3 2/9] vhost/scsi: Fix incorrect early vhost_scsi_handle_vq failures Nicholas A. Bellinger
2015-02-03  6:29 ` [PATCH-v3 3/9] vhost/scsi: Change vhost_scsi_map_to_sgl to accept iov ptr + len Nicholas A. Bellinger
2015-02-03  6:29 ` [PATCH-v3 4/9] vhost/scsi: Add ANY_LAYOUT iov -> sgl mapping prerequisites Nicholas A. Bellinger
2015-02-03  9:32   ` Michael S. Tsirkin
2015-02-04  8:48     ` Nicholas A. Bellinger
2015-02-03  6:29 ` [PATCH-v3 5/9] vhost/scsi: Add ANY_LAYOUT vhost_virtqueue callback Nicholas A. Bellinger
2015-02-03 10:14   ` Michael S. Tsirkin
2015-02-04  9:40     ` Nicholas A. Bellinger
2015-02-04  9:42       ` Michael S. Tsirkin
2015-02-04 10:41         ` Nicholas A. Bellinger
2015-02-04 10:55           ` Nicholas A. Bellinger
2015-02-04 13:16             ` Michael S. Tsirkin
2015-02-04 13:13           ` Michael S. Tsirkin
2015-02-04 13:15           ` Michael S. Tsirkin
2015-02-03 15:22   ` Michael S. Tsirkin
2015-02-03 23:56   ` Al Viro
2015-02-04  7:14     ` Michael S. Tsirkin
2015-02-04 10:11     ` Nicholas A. Bellinger
2015-02-04 10:20       ` Michael S. Tsirkin
2015-02-04 10:41         ` Nicholas A. Bellinger
2015-02-03  6:30 ` [PATCH-v3 6/9] vhost/scsi: Set VIRTIO_F_ANY_LAYOUT + VIRTIO_F_VERSION_1 feature bits Nicholas A. Bellinger
2015-02-03  9:40   ` Michael S. Tsirkin
2015-02-04  9:13     ` Nicholas A. Bellinger
2015-02-04  9:34       ` Michael S. Tsirkin
2015-02-03  6:30 ` [PATCH-v3 7/9] vhost/scsi: Drop legacy pre virtio v1.0 !ANY_LAYOUT logic Nicholas A. Bellinger
2015-02-03  9:37   ` Michael S. Tsirkin
2015-02-04  9:03     ` Nicholas A. Bellinger
2015-02-03  6:30 ` [PATCH-v3 8/9] vhost/scsi: Drop left-over scsi_tcq.h include Nicholas A. Bellinger
2015-02-03  9:38   ` Michael S. Tsirkin
2015-02-03  6:30 ` [PATCH-v3 9/9] vhost/scsi: Global tcm_vhost -> vhost_scsi rename Nicholas A. Bellinger
2015-02-03  9:38   ` Michael S. Tsirkin
2015-02-03  9:35 ` [PATCH-v3 0/9] vhost/scsi: Add ANY_LAYOUT + VERSION_1 support Michael S. Tsirkin
2015-02-04  8:51   ` Nicholas A. Bellinger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.