[ANNOUNCE] lio-utils.git v3.0 configfs HOWTO for v2.6.30 released

2009-06-16 Thread Nicholas A. Bellinger
Grettings all, The Linux-iSCSI.org Target v3.0 HOWTO using the new configfs enabled generic target subsystem python CLI has been released and is up and running on v2.6.30 of the Linux Kernel in x86_64 KVM (Debian), x86_64 bare-metal (SLES) and PPC64 (Fedora PS3) hosts! The HOWTO entry can be foun

[PATCH] tcm_vhost: Convert to cmwq submission for I/O dispatch

2012-07-08 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch converts tcm_vhost to use modern concurrency managed workqueues to offload setup of tcm_vhost_cmd descriptors to a kworker CPU thread that is running on the same core as the vhost thread pulling elements off the virtqueue from within vhost_scsi_handle_vq(). Th

Re: [PATCH 0/6] tcm_vhost/virtio-scsi WIP code for-3.6

2012-07-09 Thread Nicholas A. Bellinger
Hi folks, On Wed, 2012-07-04 at 18:52 -0700, Nicholas A. Bellinger wrote: > > To give an idea of how things are looking on the performance side, here > some initial numbers for small block (4k) mixed random IOPs using the > following fio test setup: > fio randrw workload |

[PATCH] hw/virtio-scsi: Set max_target=0 during vhost-scsi operation

2012-07-11 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This QEMU patch sets VirtIOSCSIConfig->max_target=0 for vhost-scsi operation to restrict virtio-scsi LLD guest scanning to max_id=0 (a single target ID instance) when connected to individual tcm_vhost endpoints as requested by Paolo. This ensures that virtio-scsi LLD onl

[RFC-v2 0/4] tcm_vhost+cmwq fabric driver code for-3.6

2012-07-11 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi folks, The following is a RFC-v2 series of tcm_vhost target fabric driver code currently in-flight for-3.6 mainline code. After last week's developments along with the help of some new folks, the changelog v1 -> v2 so far looks like: *) Fix drivers/vhost/test.c to u

[RFC-v2 1/4] vhost: Separate vhost-net features from vhost features

2012-07-11 Thread Nicholas A. Bellinger
: Michael S. Tsirkin Cc: Paolo Bonzini Cc: Asias He Signed-off-by: Nicholas A. Bellinger --- drivers/vhost/net.c |4 ++-- drivers/vhost/test.c |4 ++-- drivers/vhost/vhost.h |3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c

[RFC-v2 2/4] vhost: make vhost work queue visible

2012-07-11 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi The vhost work queue allows processing to be done in vhost worker thread context, which uses the owner process mm. Access to the vring and guest memory is typically only possible from vhost worker context so it is useful to allow work to be queued directly by users. Curren

[RFC-v2 3/4] vhost: Add vhost_scsi specific defines

2012-07-11 Thread Nicholas A. Bellinger
Hajnoczi Cc: Zhi Yong Wu Cc: Michael S. Tsirkin Cc: Paolo Bonzini , Signed-off-by: Nicholas A. Bellinger --- include/linux/vhost.h |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/include/linux/vhost.h b/include/linux/vhost.h index e847f1e..33b313b 100644 --- a

[RFC-v2 4/4] tcm_vhost: Initial merge for vhost level target fabric driver

2012-07-11 Thread Nicholas A. Bellinger
** + * Vhost kernel TCM fabric driver for virtio SCSI initiators + * + * (C) Copyright 2010-2012 RisingTide Systems LLC. + * (C) Copyright 2010-2012 IBM Corp. + * + * Licensed to the Linux Foundation under the General Public License (GPL) version 2

[PATCH-v2] virtio-scsi: Add vdrv->scan for post VIRTIO_CONFIG_S_DRIVER_OK LUN scanning

2012-07-11 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch changes virtio-scsi to use a new virtio_driver->scan() callback so that scsi_scan_host() can be properly invoked once virtio_dev_probe() has set add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK) to signal active virtio-ring operation, instead of from within virtscsi_p

Re: [PATCH] virtio-scsi: Add vdrv->scan for post VIRTIO_CONFIG_S_DRIVER_OK LUN scanning

2012-07-11 Thread Nicholas A. Bellinger
On Wed, 2012-07-11 at 19:37 +0100, James Bottomley wrote: > On Fri, 2012-07-06 at 20:15 +0000, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > This patch changes virtio-scsi to use a new virtio_driver->scan() callback > > so that scsi_scan_host(

Re: [patch 1/3 -next] tcm_vhost: unlock on error in tcm_vhost_drop_nexus()

2012-07-12 Thread Nicholas A. Bellinger
On Thu, 2012-07-12 at 17:47 +0300, Dan Carpenter wrote: > We need to unlock here before returning. > > Signed-off-by: Dan Carpenter > > diff --git a/drivers/vhost/tcm_vhost.c b/drivers/vhost/tcm_vhost.c > index da0b8ac..d217bed 100644 > --- a/drivers/vhost/tcm_vhost.c > +++ b/drivers/vhost/tcm_v

Re: [patch 2/3 -next] tcm_vhost: strlen() doesn't count the terminator

2012-07-12 Thread Nicholas A. Bellinger
On Thu, 2012-07-12 at 17:48 +0300, Dan Carpenter wrote: > We do snprintf() from "page" to a buffer with TCM_VHOST_NAMELEN > characters so the current code will silently truncate the last > character. > > Signed-off-by: Dan Carpenter > > diff --git a/drivers/vhost/tcm_vhost.c b/drivers/vhost/tcm_

Re: [patch 3/3 -next] tcm_vhost: call kfree() on an error path

2012-07-12 Thread Nicholas A. Bellinger
On Thu, 2012-07-12 at 17:48 +0300, Dan Carpenter wrote: > There is a memory leak here. > > Signed-off-by: Dan Carpenter > > diff --git a/drivers/vhost/tcm_vhost.c b/drivers/vhost/tcm_vhost.c > index 57d39c5..29850cb 100644 > --- a/drivers/vhost/tcm_vhost.c > +++ b/drivers/vhost/tcm_vhost.c > @@

Re: [PATCH] hw/virtio-scsi: Set max_target=0 during vhost-scsi operation

2012-07-12 Thread Nicholas A. Bellinger
Hi Zhi, On Thu, 2012-07-12 at 14:59 +0800, Zhi Yong Wu wrote: > thanks, it is applied to my vhost_scsi git tree > git://github.com/wuzhy/qemu.git vhost-scsi > Thanks for picking up this patch in your vhost-scsi tree. As mentioned off-list, I'd like to rebase to a more recent qemu.git to include

Re: [patch -next] tcm_vhost: another strlen() off by one

2012-07-14 Thread Nicholas A. Bellinger
On Fri, 2012-07-13 at 13:45 +0300, Dan Carpenter wrote: > strlen() doesn't count the NUL terminator. I missed this one in the > patches I sent yesterday. > > Signed-off-by: Dan Carpenter > > diff --git a/drivers/vhost/tcm_vhost.c b/drivers/vhost/tcm_vhost.c > index 29850cb..ea72198 100644 > ---

Re: [RFC-v2 0/4] tcm_vhost+cmwq fabric driver code for-3.6

2012-07-17 Thread Nicholas A. Bellinger
On Tue, 2012-07-17 at 18:05 +0300, Michael S. Tsirkin wrote: > On Wed, Jul 11, 2012 at 09:15:00PM +0000, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > Hi folks, > > > > The following is a RFC-v2 series of tcm_vhost target fabric driver cod

Re: [RFC-v2 0/4] tcm_vhost+cmwq fabric driver code for-3.6

2012-07-17 Thread Nicholas A. Bellinger
On Tue, 2012-07-17 at 13:55 -0500, Anthony Liguori wrote: > On 07/17/2012 10:05 AM, Michael S. Tsirkin wrote: > > On Wed, Jul 11, 2012 at 09:15:00PM +, Nicholas A. Bellinger wrote: > > > > It still seems not 100% clear whether this driver will have major > > use

Re: [RFC-v2 0/4] tcm_vhost+cmwq fabric driver code for-3.6

2012-07-17 Thread Nicholas A. Bellinger
On Wed, 2012-07-18 at 00:34 +0300, Michael S. Tsirkin wrote: > On Tue, Jul 17, 2012 at 02:17:22PM -0700, Nicholas A. Bellinger wrote: > > On Tue, 2012-07-17 at 18:05 +0300, Michael S. Tsirkin wrote: > > > On Wed, Jul 11, 2012 at 09:15:00PM +, Nicholas A. Bellinger wrote: >

Re: [RFC-v2 0/4] tcm_vhost+cmwq fabric driver code for-3.6

2012-07-17 Thread Nicholas A. Bellinger
On Wed, 2012-07-18 at 00:58 +0300, Michael S. Tsirkin wrote: > On Tue, Jul 17, 2012 at 02:17:22PM -0700, Nicholas A. Bellinger wrote: > > Wrt to staging, I'd like to avoid mucking with staging because: > > > > *) The code has been posted for review > > *) The co

Re: [RFC-v2 0/4] tcm_vhost+cmwq fabric driver code for-3.6

2012-07-17 Thread Nicholas A. Bellinger
On Wed, 2012-07-18 at 01:18 +0300, Michael S. Tsirkin wrote: > On Tue, Jul 17, 2012 at 03:02:08PM -0700, Nicholas A. Bellinger wrote: > > On Wed, 2012-07-18 at 00:34 +0300, Michael S. Tsirkin wrote: > > > On Tue, Jul 17, 2012 at 02:17:22PM -0700, Nicholas A. Bellinger wrote: &g

Re: [RFC-v2 0/4] tcm_vhost+cmwq fabric driver code for-3.6

2012-07-17 Thread Nicholas A. Bellinger
On Wed, 2012-07-18 at 02:11 +0300, Michael S. Tsirkin wrote: > On Tue, Jul 17, 2012 at 03:37:20PM -0700, Nicholas A. Bellinger wrote: > > On Wed, 2012-07-18 at 01:18 +0300, Michael S. Tsirkin wrote: > > > On Tue, Jul 17, 2012 at 03:02:08PM -0700, Nicholas A. Bellinger wrote: &g

[RFC-v3 0/4] tcm_vhost+cmwq fabric driver code for-3.6

2012-07-17 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi folks, The following is the RFC-v3 series of tcm_vhost target fabric driver code currently in-flight for-3.6 mainline code. With the merge window opening soon, the tcm_vhost code has started seeing time in linux-next. The v2 -> v3 changelog from the last week is cur

[RFC-v3 2/4] vhost: make vhost work queue visible

2012-07-17 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi The vhost work queue allows processing to be done in vhost worker thread context, which uses the owner process mm. Access to the vring and guest memory is typically only possible from vhost worker context so it is useful to allow work to be queued directly by users. Curren

[RFC-v3 3/4] vhost: Add vhost_scsi specific defines

2012-07-17 Thread Nicholas A. Bellinger
Hajnoczi Cc: Zhi Yong Wu Cc: Michael S. Tsirkin Cc: Paolo Bonzini , Signed-off-by: Nicholas A. Bellinger --- include/linux/vhost.h |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/include/linux/vhost.h b/include/linux/vhost.h index e847f1e..33b313b 100644 --- a

[RFC-v3 1/4] vhost: Separate vhost-net features from vhost features

2012-07-17 Thread Nicholas A. Bellinger
: Michael S. Tsirkin Cc: Paolo Bonzini Cc: Asias He Signed-off-by: Nicholas A. Bellinger --- drivers/vhost/net.c |4 ++-- drivers/vhost/test.c |4 ++-- drivers/vhost/vhost.h |3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c

[RFC-v3 4/4] tcm_vhost: Initial merge for vhost level target fabric driver

2012-07-17 Thread Nicholas A. Bellinger
SCSI initiators + * + * (C) Copyright 2010-2012 RisingTide Systems LLC. + * (C) Copyright 2010-2012 IBM Corp. + * + * Licensed to the Linux Foundation under the General Public License (GPL) version 2. + * + * Authors: Nicholas A. Bellinger + * Stefan Hajnoczi + * + * This program is free software;

Re: [RFC-v3 3/4] vhost: Add vhost_scsi specific defines

2012-07-18 Thread Nicholas A. Bellinger
On Wed, 2012-07-18 at 16:05 +0300, Michael S. Tsirkin wrote: > On Wed, Jul 18, 2012 at 12:59:31AM +0000, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > This patch adds the initial vhost_scsi_ioctl() callers for > > VHOST_SCSI_SET_ENDPOINT > &

Re: [RFC-v3 4/4] tcm_vhost: Initial merge for vhost level target fabric driver

2012-07-18 Thread Nicholas A. Bellinger
On Wed, 2012-07-18 at 19:09 +0300, Michael S. Tsirkin wrote: > On Wed, Jul 18, 2012 at 12:59:32AM +0000, Nicholas A. Bellinger wrote: > > > > Changelog v2 -> v3: > > > > Unlock on error in tcm_vhost_drop_nexus() (DanC) > > Fix strlen() doesn't cou

Re: [RFC-v2 0/4] tcm_vhost+cmwq fabric driver code for-3.6

2012-07-18 Thread Nicholas A. Bellinger
On Wed, 2012-07-18 at 08:42 -0500, Anthony Liguori wrote: > On 07/17/2012 04:50 PM, Nicholas A. Bellinger wrote: > > On Tue, 2012-07-17 at 13:55 -0500, Anthony Liguori wrote: > >> On 07/17/2012 10:05 AM, Michael S. Tsirkin wrote: > >>> On Wed, Jul 11, 2012 a

Re: [RFC-v3 4/4] tcm_vhost: Initial merge for vhost level target fabric driver

2012-07-20 Thread Nicholas A. Bellinger
On Fri, 2012-07-20 at 15:03 +0300, Michael S. Tsirkin wrote: > On Wed, Jul 18, 2012 at 02:20:58PM -0700, Nicholas A. Bellinger wrote: > > On Wed, 2012-07-18 at 19:09 +0300, Michael S. Tsirkin wrote: > > > On Wed, Jul 18, 2012 at 12:59:32AM +, Nicholas

Re: [RFC-v3 4/4] tcm_vhost: Initial merge for vhost level target fabric driver

2012-07-20 Thread Nicholas A. Bellinger
On Fri, 2012-07-20 at 11:00 -0700, Nicholas A. Bellinger wrote: > On Fri, 2012-07-20 at 15:03 +0300, Michael S. Tsirkin wrote: > > On Wed, Jul 18, 2012 at 02:20:58PM -0700, Nicholas A. Bellinger wrote: > > > On Wed, 2012-07-18 at 19:09 +0300, Michael S. Tsirkin wrote: > >

[RFC-v4 0/3] tcm_vhost+cmwq fabric driver code for-3.6

2012-07-20 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi MST, Greg-KH & Co, The following is -v4 of the in-flight TCM vhost fabric driver for-3.6 code. This series has been rebased into target-pending.git/for-next-merge this evening, and the changelog over the last days from v3 -> v4 has been: *) Rename vhost_vring_tar

[RFC-v4 1/3] vhost: Separate vhost-net features from vhost features

2012-07-20 Thread Nicholas A. Bellinger
: Michael S. Tsirkin Cc: Paolo Bonzini Cc: Asias He Signed-off-by: Nicholas A. Bellinger --- drivers/vhost/net.c |4 ++-- drivers/vhost/test.c |4 ++-- drivers/vhost/vhost.h |3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c

[RFC-v4 2/3] vhost: make vhost work queue visible

2012-07-20 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi The vhost work queue allows processing to be done in vhost worker thread context, which uses the owner process mm. Access to the vring and guest memory is typically only possible from vhost worker context so it is useful to allow work to be queued directly by users. Curren

[RFC-v4 3/3] tcm_vhost: Initial merge for vhost level target fabric driver

2012-07-20 Thread Nicholas A. Bellinger
vhost/tcm_vhost.c new file mode 100644 index 000..dc7e024 --- /dev/null +++ b/drivers/vhost/tcm_vhost.c @@ -0,0 +1,1611 @@ +/*** + * Vhost kernel TCM fabric driver for virtio SCSI initiators + * + * (C) Copyright 2010-2012 RisingTide Systems LLC. + * (C) Copyright 2010-2012 IBM Co

Re: linux-next: manual merge of the staging tree with the target-merge tree

2012-07-22 Thread Nicholas A. Bellinger
On Sat, 2012-07-21 at 19:07 -0700, Greg KH wrote: > On Fri, Jul 20, 2012 at 09:42:28PM +0300, Michael S. Tsirkin wrote: > > It's very similar to how it was with nouveau: we are not sure > > we can commit to the userspace ABI yet. > > Then you are in trouble :) > I agree with MST here that tcm

Re: linux-next: manual merge of the staging tree with the target-merge tree

2012-07-23 Thread Nicholas A. Bellinger
On Mon, 2012-07-23 at 08:16 -0700, Greg KH wrote: > On Sun, Jul 22, 2012 at 02:44:23PM -0700, Nicholas A. Bellinger wrote: > > So Linus has merged target-pending/for-next this afternoon, so now we > > are just waiting on net-next to hit mainline with the vhost patches > >

[PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-23 Thread Nicholas A. Bellinger
From: Nicholas Bellinger As requested by Anthony, here is a patch against target-pending/for-next-merge to expose an ABI version to userspace via a new VHOST_SCSI_GET_ABI_VERSION ioctl operation. As mentioned in the comment, ABI Rev 0 is for pre 2012 out-of-tree code, and ABI Rev 1 (the current

[PATCH 0/2] vhost-scsi: Check for tcm_vhost ABI version

2012-07-23 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi Anthony, Here are the two patches against Zhi's vhost-scsi tree to check for a supported version (VHOST_SCSI_ABI_VERSION=1) that's now exposed via the tcm_vhost ioctl. Please have a look and let me know if this is what you had in mind. Thanks! Nicholas Bellinger (2

[PATCH 2/2] vhost-scsi: Add support for VHOST_SCSI_GET_ABI_VERSION ioctl

2012-07-23 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds support in vhost-scsi QEMU userspace code to check the running tcm_vhost ABI version using VHOST_SCSI_GET_ABI_VERSION. This series selects VHOST_SCSI_ABI_VERSION=1 for current code, and requires the pre-requsite tcm_vhost patch to expose an ABI version nu

[PATCH 1/2] vhost-scsi: Rename vhost_vring_target -> vhost_scsi_target

2012-07-23 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Rename the main IOCTL structure to vhost_scsi_target so that it makes a little more sense than vhost_vring_target. As requested by MST. Reported-by: Michael S. Tsirkin Cc: Stefan Hajnoczi Cc: Anthony Liguori Cc: Paolo Bonzini Cc: Zhi Yong Wu Signed-off-by: Nicholas

vhost-scsi port to v1.1.0 + MSI-X performance regression

2012-07-24 Thread Nicholas A. Bellinger
Hi Anthony, Stefan & QEMU folks, So during the process of separating out the patches from Zhi's vhost-scsi tree this evening, I managed to squash everything down to nine nicely reviewable patches that apply against the current qemu.git/master: Nicholas Bellinger (1): virtio-scsi: Set max_target

Re: vhost-scsi port to v1.1.0 + MSI-X performance regression

2012-07-24 Thread Nicholas A. Bellinger
On Tue, 2012-07-24 at 09:57 +0200, Jan Kiszka wrote: > On 2012-07-24 09:42, Nicholas A. Bellinger wrote: > > Hi Anthony, Stefan & QEMU folks, > > > > However, thus far I've not been able to get virtio-scsi <-> tcm_vhost > > I/O to actual

Re: [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-24 Thread Nicholas A. Bellinger
On Mon, 2012-07-23 at 18:56 -0700, Greg Kroah-Hartman wrote: > On Tue, Jul 24, 2012 at 01:26:20AM +0000, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > As requested by Anthony, here is a patch against > > target-pending/for-next-merge > > to e

Re: vhost-scsi port to v1.1.0 + MSI-X performance regression

2012-07-24 Thread Nicholas A. Bellinger
On Tue, 2012-07-24 at 13:20 -0700, Nicholas A. Bellinger wrote: > On Tue, 2012-07-24 at 09:57 +0200, Jan Kiszka wrote: > > On 2012-07-24 09:42, Nicholas A. Bellinger wrote: > > > Hi Anthony, Stefan & QEMU folks, > > > > > > > > > Howeve

[RFC 0/9] vhost-scsi: Add support for host virtualized target

2012-07-24 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi Anthony + QEMU storage folks, The following is a reviewable RFC series of vhost-scsi against yesterday's QEMU.git/master @ commit 401a66357d. The series is available directly from: git://git.kernel.org/pub/scm/virt/kvm/nab/qemu-kvm.git vhost-scsi-merge It contain

[RFC 2/9] virtio-pci: support host notifiers in TCG mode

2012-07-24 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi Normally host notifiers are only used together with vhost-net in KVM mode. It is occassionally useful to use vhost with TCG mode, mainly for testing and development. This isn't hard to achieve, simply fall back to notifying the host notifier manually from qemu if KVM mode

[RFC 1/9] notifier: add validity check and notify function

2012-07-24 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi Event notifiers that have not had the event_notifier_init() function called on them are invalid. The event_notifier_valid() function checks whether or not an event notifier is valild. This can be used to check whether a notifier is in use or not. It sometimes useful to no

[RFC 3/9] virtio-pci: check that event notification worked

2012-07-24 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi For sanity assert that event notification succeeds. Signed-off-by: Stefan Hajnoczi Cc: Anthony Liguori Cc: Paolo Bonzini Signed-off-by: Nicholas Bellinger --- hw/virtio-pci.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/hw/virtio-pci.c b

[RFC 5/9] virtio-scsi: Add wwpn and tgpt properties

2012-07-24 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi A vhost-scsi device must be bound to a tcm_vhost target port. This will be done by issuing an ioctl to the device with the wwpn and tgpt. This patch adds these properties to the virtio-scsi-pci device: qemu -device virtio-scsi-pci,wwpn=$TARGET_WWN,tgpt=$TPGT Future pat

[RFC 4/9] vhost: Pass device path to vhost_dev_init()

2012-07-24 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi The path to /dev/vhost-net is currently hardcoded in vhost_dev_init(). This needs to be changed so that /dev/vhost-scsi can be used. Pass in the device path instead of hardcoding it. Signed-off-by: Stefan Hajnoczi Cc: Paolo Bonzini Cc: Michael S. Tsirkin Signed-off-by:

[RFC 6/9] virtio-scsi: Open and initialize /dev/vhost-scsi

2012-07-24 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi Begin adding vhost support by opening /dev/vhost-scsi. (v2: Drop legacy ->vhost_vqs[] usage) Signed-off-by: Stefan Hajnoczi Signed-off-by: Zhi Yong Wu Cc: Michael S. Tsirkin Cc: Paolo Bonzini Signed-off-by: Nicholas Bellinger --- hw/virtio-scsi.c | 12

[RFC 7/9] virtio-scsi: Start/stop vhost

2012-07-24 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi This patch starts and stops vhost as the virtio device transitions through its status phases. Vhost can only be started once the guest reports its driver has successfully initialized, which means the virtqueues have been set up by the guest. (v2: Squash virtio-scsi: use th

[RFC 8/9] virtio-scsi: Set max_target=0 during vhost-scsi operation

2012-07-24 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This QEMU patch sets VirtIOSCSIConfig->max_target=0 for vhost-scsi operation to restrict virtio-scsi LLD guest scanning to max_id=0 (a single target ID instance) when connected to individual tcm_vhost endpoints. This ensures that virtio-scsi LLD only attempts to scan tar

[RFC 9/9] vhost-scsi: add -vhost-scsi host device

2012-07-24 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi This patch adds a new type of host device that drives the vhost_scsi device. The syntax to add vhost-scsi is: qemu -vhost-scsi id=vhost-scsi0,wwpn=...,tpgt=123 The virtio-scsi emulated device will make use of vhost-scsi to process virtio-scsi requests inside the kernel

Re: [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-25 Thread Nicholas A. Bellinger
On Wed, 2012-07-25 at 16:10 +0300, Avi Kivity wrote: > On 07/24/2012 11:45 PM, Nicholas A. Bellinger wrote: > > >> > diff --git a/drivers/vhost/tcm_vhost.h b/drivers/vhost/tcm_vhost.h > >> > index e942df9..3d5378f 100644 > >> > --- a/drivers/vh

Re: [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-25 Thread Nicholas A. Bellinger
On Wed, 2012-07-25 at 12:55 +0100, Stefan Hajnoczi wrote: > On Tue, Jul 24, 2012 at 01:45:24PM -0700, Nicholas A. Bellinger wrote: > > On Mon, 2012-07-23 at 18:56 -0700, Greg Kroah-Hartman wrote: > > > On Tue, Jul 24, 2012 at 01:26:20AM +, Nicholas A. Bellinger wrote: >

Re: [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-25 Thread Nicholas A. Bellinger
On Wed, 2012-07-25 at 23:35 +0100, Stefan Hajnoczi wrote: > On Wed, Jul 25, 2012 at 02:14:50PM -0700, Nicholas A. Bellinger wrote: > > On Wed, 2012-07-25 at 12:55 +0100, Stefan Hajnoczi wrote: > > > On Tue, Jul 24, 2012 at 01:45:24PM -0700, Nicholas A. Bellinger wrote: > >

Re: [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-26 Thread Nicholas A. Bellinger
On Thu, 2012-07-26 at 11:58 +0300, Avi Kivity wrote: > On 07/26/2012 05:34 AM, Nicholas A. Bellinger wrote: > > > > In that case, respinning a -v5 for tcm_vhost to start from ABI=0 and > > will post an updated patch shortly. > > > >> The main thing I wou

[RFC-v5] tcm_vhost: Initial merge for vhost level target fabric driver

2012-07-26 Thread Nicholas A. Bellinger
* + * Vhost kernel TCM fabric driver for virtio SCSI initiators + * + * (C) Copyright 2010-2012 RisingTide Systems LLC. + * (C) Copyright 2010-2012 IBM Corp. + * + * Licensed to the Linux Foundation under the General Public License (GPL) version 2. + * + * Authors: Nicholas A. Bellinger + *

Status update for tcm_vhost driver merge

2012-07-27 Thread Nicholas A. Bellinger
Hello folks, The RFC-v5 patch for tcm_vhost kernel code was sent out for review a bit less than 24 hours ago, and thus far there has not been any additional comments.. Thanks to everyone who has been participating in the various threads over the past week and giving their feedback! Also, just a

[PATCH] tcm_vhost: Post-merge review changes requested by MST

2012-07-30 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch contains the post RFC-v5 (post-merge) changes, this includes: - Add locking comment - Move vhost_scsi_complete_cmd ahead of TFO callbacks in order to drop forward declarations - Drop extra '!= NULL' usage in vhost_scsi_complete_cmd_work() - Change vhost_scsi

[GIT PULL] tcm_vhost: Initial merge of vhost level target fabric driver

2012-07-30 Thread Nicholas A. Bellinger
Hi Linus, Here is the PULL request for the initial merge of tcm_vhost based on RFC-v5 code with MST's ACK appended to the initial merge commit. As promised, the commit is available from two different branches for you to consider merging as for-3.6 code. The 'for-next-merge' branch based on mainli

Re: [GIT PULL] tcm_vhost: Initial merge of vhost level target fabric driver

2012-08-02 Thread Nicholas A. Bellinger
ou! --nab On Mon, 2012-07-30 at 18:19 -0700, Nicholas A. Bellinger wrote: > Hi Linus, > > Here is the PULL request for the initial merge of tcm_vhost based on > RFC-v5 code with MST's ACK appended to the initial merge commit. > As promised, the commit is available from two d

[RFC-v2 0/6] vhost-scsi: Add support for host virtualized target

2012-08-13 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi Paolo, Stefan, & QEMU folks, The following is the second RFC series for vhost-scsi patches against mainline QEMU v1.1.0. The series is available from the following working branch: git://git.kernel.org/pub/scm/virt/kvm/nab/qemu-kvm.git vhost-scsi-merge Apologies f

[RFC-v2 2/6] vhost: Pass device path to vhost_dev_init()

2012-08-13 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi The path to /dev/vhost-net is currently hardcoded in vhost_dev_init(). This needs to be changed so that /dev/vhost-scsi can be used. Pass in the device path instead of hardcoding it. Signed-off-by: Stefan Hajnoczi Cc: Paolo Bonzini Cc: Michael S. Tsirkin Signed-off-by:

[RFC-v2 1/6] msix: Work-around for vhost-scsi with KVM in-kernel MSI injection

2012-08-13 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This is required to get past the following assert with: commit 1523ed9e1d46b0b54540049d491475ccac7e6421 Author: Jan Kiszka Date: Thu May 17 10:32:39 2012 -0300 virtio/vhost: Add support for KVM in-kernel MSI injection Cc: Stefan Hajnoczi Cc: Jan Kiszka Cc: Pao

[RFC-v2 3/6] vhost-scsi: add -vhost-scsi host device for use with tcm-vhost

2012-08-13 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi This patch adds a new type of host device that drives the vhost_scsi device. The syntax to add vhost-scsi is: qemu -vhost-scsi id=vhost-scsi0,wwpn=...,tpgt=123 The virtio-scsi emulated device will make use of vhost-scsi to process virtio-scsi requests inside the kernel

[RFC-v2 6/6] virtio-scsi: Fix incorrect VirtIOSCSI->cmd_vqs[0] definition

2012-08-13 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch fixes bug in the definition of VirtIOSCSI->cmd_vqs[0], where the return of virtio_add_queue() in virtio_scsi_init() ends up overwriting past the end of ->cmd_vqs[0]. Since virtio_scsi currently assumes a single vqs for data, this patch simply changes ->cmd_vqs

[RFC-v2 4/6] virtio-scsi: Add start/stop functionality for vhost-scsi

2012-08-13 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi This patch starts and stops vhost as the virtio device transitions through its status phases. Vhost can only be started once the guest reports its driver has successfully initialized, which means the virtqueues have been set up by the guest. v2: - Squash virtio-scsi: use t

[RFC-v2 5/6] virtio-scsi: Set max_target=0 during vhost-scsi operation

2012-08-13 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This QEMU patch sets VirtIOSCSIConfig->max_target=0 for vhost-scsi operation to restrict virtio-scsi LLD guest scanning to max_id=0 (a single target ID instance) when connected to individual tcm_vhost endpoints. This ensures that virtio-scsi LLD only attempts to scan tar

Re: [RFC-v2 1/6] msix: Work-around for vhost-scsi with KVM in-kernel MSI injection

2012-08-14 Thread Nicholas A. Bellinger
On Mon, 2012-08-13 at 21:17 +0300, Michael S. Tsirkin wrote: > On Mon, Aug 13, 2012 at 08:06:17PM +0200, Jan Kiszka wrote: > > On 2012-08-13 20:03, Michael S. Tsirkin wrote: > > > On Mon, Aug 13, 2012 at 02:06:10PM +0200, Jan Kiszka wrote: > > >> On 2012-08-13 10:3

Re: [RFC-v2 6/6] virtio-scsi: Fix incorrect VirtIOSCSI->cmd_vqs[0] definition

2012-08-14 Thread Nicholas A. Bellinger
On Mon, 2012-08-13 at 12:02 +0300, Michael S. Tsirkin wrote: > On Mon, Aug 13, 2012 at 08:35:17AM +0000, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > This patch fixes bug in the definition of VirtIOSCSI->cmd_vqs[0], > > where the r

Re: [RFC-v2 3/6] vhost-scsi: add -vhost-scsi host device for use with tcm-vhost

2012-08-14 Thread Nicholas A. Bellinger
On Mon, 2012-08-13 at 11:53 +0300, Michael S. Tsirkin wrote: > On Mon, Aug 13, 2012 at 08:35:14AM +0000, Nicholas A. Bellinger wrote: > > From: Stefan Hajnoczi > > > > This patch adds a new type of host device that drives the vhost_scsi > > device. The

Re: [RFC-v2 3/6] vhost-scsi: add -vhost-scsi host device for use with tcm-vhost

2012-08-14 Thread Nicholas A. Bellinger
On Mon, 2012-08-13 at 11:59 +0300, Michael S. Tsirkin wrote: > On Mon, Aug 13, 2012 at 08:35:14AM +0000, Nicholas A. Bellinger wrote: > > From: Stefan Hajnoczi > > > > This patch adds a new type of host device that drives the vhost_scsi > > device. The

Re: [Qemu-devel] [RFC-v2 3/6] vhost-scsi: add -vhost-scsi host device for use with tcm-vhost

2012-08-14 Thread Nicholas A. Bellinger
On Mon, 2012-08-13 at 19:47 +, Blue Swirl wrote: > On Mon, Aug 13, 2012 at 8:35 AM, Nicholas A. Bellinger > wrote: > > From: Stefan Hajnoczi > > > > This patch adds a new type of host device that drives the vhost_scsi > > device. The syntax to add vhost-scsi

Re: [PATCH] kvm tools: Add initial virtio-scsi support

2012-08-14 Thread Nicholas A. Bellinger
On Tue, 2012-08-14 at 07:45 +0100, Stefan Hajnoczi wrote: > On Tue, Aug 14, 2012 at 09:52:55AM +0800, Asias He wrote: > > On Mon, Aug 13, 2012 at 3:24 PM, Pekka Enberg wrote: > > > On Thu, Aug 9, 2012 at 3:51 AM, Asias He wrote: > > >> --- > > >> diff --git a/tools/kvm/include/kvm/disk-image.h

Re: [RFC-v2 6/6] virtio-scsi: Fix incorrect VirtIOSCSI->cmd_vqs[0] definition

2012-08-18 Thread Nicholas A. Bellinger
On Sat, 2012-08-18 at 20:52 +0200, Paolo Bonzini wrote: > Il 14/08/2012 22:20, Nicholas A. Bellinger ha scritto: > >>> > > Since virtio_scsi currently assumes a single vqs for data, this patch > >>> > > simply changes ->cmd_vqs[1] to handle the single Vi

Re: [GIT PULL] tcm_vhost: Initial merge of vhost level target fabric driver

2012-08-18 Thread Nicholas A. Bellinger
On Sat, 2012-08-18 at 23:04 +0300, Michael S. Tsirkin wrote: > Hi Nicholas, > I just noticed this problem in the interface: > > +#include > + > +/* > + * Used by QEMU userspace to ensure a consistent vhost-scsi ABI. > + * > + * ABI Rev 0: July 2012 version starting point for v3.6-rc merge > candi

Re: [RFC-v2 3/6] vhost-scsi: add -vhost-scsi host device for use with tcm-vhost

2012-08-18 Thread Nicholas A. Bellinger
On Sat, 2012-08-18 at 22:10 +0300, Michael S. Tsirkin wrote: > On Tue, Aug 14, 2012 at 02:12:29PM -0700, Nicholas A. Bellinger wrote: > > On Mon, 2012-08-13 at 11:59 +0300, Michael S. Tsirkin wrote: > > > On Mon, Aug 13, 2012 at 08:35:14AM +, Nicholas

Re: [RFC-v2 3/6] vhost-scsi: add -vhost-scsi host device for use with tcm-vhost

2012-08-18 Thread Nicholas A. Bellinger
On Sat, 2012-08-18 at 22:12 +0300, Michael S. Tsirkin wrote: > On Tue, Aug 14, 2012 at 01:31:14PM -0700, Nicholas A. Bellinger wrote: > > On Mon, 2012-08-13 at 11:53 +0300, Michael S. Tsirkin wrote: > > > On Mon, Aug 13, 2012 at 08:35:14AM +, Nicholas A. Bellinger wrote: &g

Re: [RFC-v2 3/6] vhost-scsi: add -vhost-scsi host device for use with tcm-vhost

2012-08-20 Thread Nicholas A. Bellinger
On Sun, 2012-08-19 at 11:44 +0300, Michael S. Tsirkin wrote: > On Sat, Aug 18, 2012 at 05:36:26PM -0700, Nicholas A. Bellinger wrote: > > On Sat, 2012-08-18 at 22:12 +0300, Michael S. Tsirkin wrote: > > > On Tue, Aug 14, 2012 at 01:31:14PM -0700, Nicholas A. Bellinger wrote: &g

[RFC-v3 0/5] vhost-scsi: Add support for host virtualized target

2012-08-21 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi folks, This is the third RFC for vhost-scsi patches against mainline QEMU v1.1 to support the upstream tcm_vhost host virtualized target driver now available in v3.6-rc kernel code. This series is based upon last week's commit 346fe0c4c0b, and is aiming for a future

[RFC-v3 1/5] monitor: Rename+move net_handle_fd_param -> monitor_handle_fd_param

2012-08-21 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch renames+moves the net_handle_fd_param() caller used to obtain a file descriptor from either qemu_parse_fd() (the normal case) or from monitor_get_fd() (migration case) into a generically prefixed monitor_handle_fd_param() to be used by vhost-scsi code. Also up

[RFC-v3 2/5] vhost: Pass device path to vhost_dev_init()

2012-08-21 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi The path to /dev/vhost-net is currently hardcoded in vhost_dev_init(). This needs to be changed so that /dev/vhost-scsi can be used. Pass in the device path instead of hardcoding it. Signed-off-by: Stefan Hajnoczi Cc: Paolo Bonzini Cc: Michael S. Tsirkin Signed-off-by:

[RFC-v3 4/5] virtio-scsi: Add start/stop functionality for vhost-scsi

2012-08-21 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi This patch starts and stops vhost as the virtio device transitions through its status phases. Vhost can only be started once the guest reports its driver has successfully initialized, which means the virtqueues have been set up by the guest. v3: - Add vhost-scsi.h include

[RFC-v3 3/5] vhost-scsi: add -vhost-scsi host device for use with tcm-vhost

2012-08-21 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi This patch adds a new type of host device that drives the vhost_scsi device. The syntax to add vhost-scsi is: qemu -vhost-scsi id=vhost-scsi0,wwpn=...,tpgt=123 The virtio-scsi emulated device will make use of vhost-scsi to process virtio-scsi requests inside the kernel

[RFC-v3 5/5] virtio-scsi: Set max_target=0 during vhost-scsi operation

2012-08-21 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This QEMU patch sets VirtIOSCSIConfig->max_target=0 for vhost-scsi operation to restrict virtio-scsi LLD guest scanning to max_id=0 (a single target ID instance) when connected to individual tcm_vhost endpoints. This ensures that virtio-scsi LLD only attempts to scan tar

Re: [PATCH V2] kvm tools: Add initial virtio-scsi support

2012-08-21 Thread Nicholas A. Bellinger
On Fri, 2012-08-17 at 17:26 +0800, Asias He wrote: > This patch brings virito-scsi support to kvm tool. > > With the introduce of tcm_vhost (vhost-scsi) > >tcm_vhost: Initial merge for vhost level target fabric driver > > we can implement virito-scsi by simply having vhost-scsi to handle the

Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-03 Thread Nicholas A. Bellinger
On Tue, 2012-08-28 at 13:54 +0200, Paolo Bonzini wrote: > This patch adds queue steering to virtio-scsi. When a target is sent > multiple requests, we always drive them to the same queue so that FIFO > processing order is kept. However, if a target was idle, we can choose > a queue arbitrarily.

Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-04 Thread Nicholas A. Bellinger
On Tue, 2012-09-04 at 08:46 +0200, Paolo Bonzini wrote: > Il 04/09/2012 04:21, Nicholas A. Bellinger ha scritto: > >> @@ -112,6 +118,9 @@ static void virtscsi_complete_cmd(struct virtio_scsi > >> *vscsi, void *buf) > >>struct virtio_scsi_cmd *cmd = buf; > >

[PATCH 0/6] tcm_vhost/virtio-scsi WIP code for-3.6

2012-07-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi folks, This series contains patches required to update tcm_vhost <-> virtio-scsi connected hosts <-> guests to run on v3.5-rc2 mainline code. This series is available on top of target-pending/auto-next here: git://git.kernel.org/pub/scm/linux/kernel/git/nab/targe

[PATCH 1/6] vhost: Separate vhost-net features from vhost features

2012-07-03 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi In order for other vhost devices to use the VHOST_FEATURES bits the vhost-net specific bits need to be moved to their own VHOST_NET_FEATURES constant. Signed-off-by: Stefan Hajnoczi Cc: Zhi Yong Wu Cc: Michael S. Tsirkin Cc: Paolo Bonzini Signed-off-by: Nicholas A

[PATCH 3/6] vhost: Add vhost_scsi specific defines

2012-07-03 Thread Nicholas A. Bellinger
Hajnoczi Cc: Zhi Yong Wu Cc: Michael S. Tsirkin Cc: Paolo Bonzini , Signed-off-by: Nicholas A. Bellinger --- include/linux/vhost.h |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/include/linux/vhost.h b/include/linux/vhost.h index e847f1e..33b313b 100644 --- a

[PATCH 2/6] vhost: make vhost work queue visible

2012-07-03 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi The vhost work queue allows processing to be done in vhost worker thread context, which uses the owner process mm. Access to the vring and guest memory is typically only possible from vhost worker context so it is useful to allow work to be queued directly by users. Curren

[PATCH 4/6] tcm_vhost: Initial merge for vhost level target fabric driver

2012-07-03 Thread Nicholas A. Bellinger
nel TCM fabric driver for virtio SCSI initiators + * + * (C) Copyright 2010-2012 RisingTide Systems LLC. + * (C) Copyright 2010-2012 IBM Corp. + * + * Licensed to the Linux Foundation under the General Public License (GPL) version 2. + * + * Authors: Nicholas A. Bellinger + * Stefan H

[PATCH 5/6] virtio-scsi: Add vdrv->scan for post VIRTIO_CONFIG_S_DRIVER_OK LUN scanning

2012-07-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch changes virtio-scsi to use a new virtio_driver->scan() callback so that scsi_scan_host() can be properly invoked once virtio_dev_probe() has set add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK) to signal active virtio-ring operation, instead of from within virtscsi_p

[PATCH 6/6] virtio-scsi: Set shost->max_id=1 for tcm_vhost WWPNs

2012-07-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This is currently required for connecting to tcm_vhost in order to prevent the client LUN scan from detecting the same tcm_vhost WWPN on multiple target IDs. Cc: Paolo Bonzini Cc: Stefan Hajnoczi Cc: Zhi Yong Wu Cc: Christoph Hellwig Cc: Hannes Reinecke Signed-off-b

Re: [PATCH 0/6] tcm_vhost/virtio-scsi WIP code for-3.6

2012-07-04 Thread Nicholas A. Bellinger
, Jul 04, 2012 at 04:24:00AM +, Nicholas A. Bellinger wrote: > >>>> From: Nicholas Bellinger > >>>> > >>>> Hi folks, > >>>> > >>>> This series contains patches required to update tcm_vhost<-> virtio-scsi > >&

  1   2   3   4   >