Re: [PATCH-v2 0/6] vhost/scsi: Add T10 PI SGL passthrough support

2014-06-02 Thread Michael S. Tsirkin
virtio_scsi_init_hdr_pi() to use pi_bytesout + pi_bytesin (mst + paolo + nab) - Use blk_integrity-tuple_size to calculate pi bytes (nab) Please review for v3.16-rc1 code. Thanks! --nab Acked-by: Michael S. Tsirkin m...@redhat.com Nicholas Bellinger (6): virtio-scsi.h: Add virtio_scsi_cmd_req_pi

Re: [PATCH-v2 0/6] vhost/scsi: Add T10 PI SGL passthrough support

2014-06-08 Thread Michael S. Tsirkin
virtio_scsi_init_hdr_pi() to use pi_bytesout + pi_bytesin (mst + paolo + nab) - Use blk_integrity-tuple_size to calculate pi bytes (nab) Please review for v3.16-rc1 code. Thanks! --nab OK, finally went over this, looks good to me: Acked-by: Michael S. Tsirkin m...@redhat.com However, we really

Re: [PATCH-v2 1/6] virtio-scsi.h: Add virtio_scsi_cmd_req_pi + VIRTIO_SCSI_F_T10_PI bits

2014-06-09 Thread Michael S. Tsirkin
are expected to preceed the data buffers. Also add new VIRTIO_SCSI_F_T10_PI feature bit to be used to signal host support. v4 changes: - Use pi_bytesout + pi_bytesin instead of niovs (mst + paolo) Cc: Paolo Bonzini pbonz...@redhat.com Cc: Michael S. Tsirkin m...@redhat.com Cc: Martin

Re: [PATCH-v2 0/6] vhost/scsi: Add T10 PI SGL passthrough support

2014-06-09 Thread Michael S. Tsirkin
On Thu, May 22, 2014 at 02:26:16AM +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org Hi MST, MKP, Paolo Co, Here is the v2 patch series for adding T1O protection information (PI) SGL passthrough support between virtio-scsi LLD + vhost-scsi fabric

Re: [PATCH-v2 0/6] vhost/scsi: Add T10 PI SGL passthrough support

2014-06-10 Thread Michael S. Tsirkin
On Tue, Jun 10, 2014 at 12:05:12AM -0700, Nicholas A. Bellinger wrote: On Mon, 2014-06-09 at 16:30 +0300, Michael S. Tsirkin wrote: On Thu, May 22, 2014 at 02:26:16AM +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org Hi MST, MKP, Paolo Co, Here

Re: [PATCH-v2 0/6] vhost/scsi: Add T10 PI SGL passthrough support

2014-06-10 Thread Michael S. Tsirkin
On Tue, Jun 10, 2014 at 09:52:17PM +1000, Stephen Rothwell wrote: Hi Michael, On Tue, 10 Jun 2014 12:42:54 +0300 Michael S. Tsirkin m...@redhat.com wrote: So I see two options: - I go ahead with my changes and you with yours and let Linus resolve the conflict. This means bisect

Re: [PATCH-v2 0/6] vhost/scsi: Add T10 PI SGL passthrough support

2014-06-10 Thread Michael S. Tsirkin
On Tue, Jun 10, 2014 at 10:39:17AM -0700, Nicholas A. Bellinger wrote: On Tue, 2014-06-10 at 16:02 +0300, Michael S. Tsirkin wrote: On Tue, Jun 10, 2014 at 09:52:17PM +1000, Stephen Rothwell wrote: Hi Michael, On Tue, 10 Jun 2014 12:42:54 +0300 Michael S. Tsirkin m...@redhat.com

Re: [PATCH-v2 0/6] vhost/scsi: Add T10 PI SGL passthrough support

2014-06-10 Thread Michael S. Tsirkin
On Tue, Jun 10, 2014 at 10:39:17AM -0700, Nicholas A. Bellinger wrote: On Tue, 2014-06-10 at 16:02 +0300, Michael S. Tsirkin wrote: On Tue, Jun 10, 2014 at 09:52:17PM +1000, Stephen Rothwell wrote: Hi Michael, On Tue, 10 Jun 2014 12:42:54 +0300 Michael S. Tsirkin m...@redhat.com

Re: [PATCH-v2 0/6] vhost/scsi: Add T10 PI SGL passthrough support

2014-06-11 Thread Michael S. Tsirkin
On Tue, Jun 10, 2014 at 02:20:28PM -0700, Nicholas A. Bellinger wrote: On Tue, 2014-06-10 at 13:56 -0700, Linus Torvalds wrote: On Tue, Jun 10, 2014 at 1:25 PM, Nicholas A. Bellinger n...@linux-iscsi.org wrote: That would work, or I can simply include a pointer to Stephen's patch in

[PULL] vhost: infrastructure changes for 3.16

2014-06-11 Thread Michael S. Tsirkin
on vmalloc (same as for vhost-scsi) this makes it possible to create the device on systems where memory is very fragmented, with slightly lower performance. Signed-off-by: Michael S. Tsirkin m...@redhat.com Michael S. Tsirkin (4

[PATCH v3 24/25] virtio_scsi: drop scan callback

2014-10-12 Thread Michael S. Tsirkin
Enable VQs early like we do for restore. This makes it possible to drop the scan callback, moving scanning into the probe function, and making code simpler. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/scsi/virtio_scsi.c | 23 +++ 1 file changed, 7 insertions

[PATCH v3 25/25] virtio-rng: refactor probe error handling

2014-10-12 Thread Michael S. Tsirkin
Code like vi-vq = NULL; kfree(vi) does not make sense. Clean it up, use goto error labels for cleanup. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/char/hw_random/virtio-rng.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git

[PATCH v3 20/25] virtio_net: enable VQs early on restore

2014-10-12 Thread Michael S. Tsirkin
virtio spec requires drivers to set DRIVER_OK before using VQs. This is set automatically after restore returns, virtio net violated this rule by using receive VQs within restore. To fix, call virtio_enable_vqs_early before using VQs. Signed-off-by: Michael S. Tsirkin m...@redhat.com Reviewed

[PATCH v3 22/25] virtio_scsi: fix race on device removal

2014-10-12 Thread Michael S. Tsirkin
We cancel event work on device removal, but an interrupt could trigger immediately after this, and queue it again. To fix, set a flag. Loosely based on patch by Paolo Bonzini Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/scsi

[PATCH v3 21/25] virito_scsi: use freezable WQ for events

2014-10-12 Thread Michael S. Tsirkin
From: Paolo Bonzini pbonz...@redhat.com Michael S. Tsirkin noticed a race condition: we reset device on freeze, but system WQ is still running so it might try adding bufs to a VQ meanwhile. To fix, switch to handling events from the freezable WQ. Reported-by: Michael S. Tsirkin m...@redhat.com

[PATCH v3 15/25] virtio_net: fix use after free on allocation failure

2014-10-12 Thread Michael S. Tsirkin
In the extremely unlikely event that driver initialization fails after RX buffers are added, virtio net frees RX buffers while VQs are still active, potentially causing device to use a freed buffer. To fix, reset device first - same as we do on device removal. Signed-off-by: Michael S. Tsirkin m

[PATCH v3 18/25] virtio_scsi: enable VQs early on restore

2014-10-12 Thread Michael S. Tsirkin
virtio spec requires drivers to set DRIVER_OK before using VQs. This is set automatically after restore returns, virtio scsi violated this rule on restore by kicking event vq within restore. To fix, call virtio_enable_vqs_early before using event queue. Signed-off-by: Michael S. Tsirkin m

[PATCH v3 16/25] virtio_scsi: move kick event out from virtscsi_init

2014-10-12 Thread Michael S. Tsirkin
We currently kick event within virtscsi_init, before host is fully initialized. This can in theory confuse guest if device consumes the buffers immediately. To fix, move virtscsi_kick_event_all out to scan/restore. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/scsi

[PATCH v3 09/25] virtio_net: minor cleanup

2014-10-12 Thread Michael S. Tsirkin
goto done; done: return; is ugly, it was put there to make diff review easier. replace by open-coded return. Signed-off-by: Michael S. Tsirkin m...@redhat.com Acked-by: Cornelia Huck cornelia.h...@de.ibm.com --- drivers/net/virtio_net.c | 6 ++ 1 file changed, 2 insertions

[PATCH v3 11/25] virtio_net: enable VQs early

2014-10-12 Thread Michael S. Tsirkin
virtio spec requires drivers to set DRIVER_OK before using VQs. This is set automatically after probe returns, virtio net violated this rule by using receive VQs within probe. To fix, call virtio_enable_vqs_early before using VQs. Signed-off-by: Michael S. Tsirkin m...@redhat.com Reviewed

[PATCH v3 07/25] virtio_net: drop config_enable

2014-10-12 Thread Michael S. Tsirkin
notifications. Signed-off-by: Michael S. Tsirkin m...@redhat.com Reviewed-by: Cornelia Huck cornelia.h...@de.ibm.com --- drivers/net/virtio_net.c | 27 --- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index

[PATCH v3 14/25] 9p/trans_virtio: enable VQs early

2014-10-12 Thread Michael S. Tsirkin
-by: Michael S. Tsirkin m...@redhat.com --- net/9p/trans_virtio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index 6940d8f..766ba48 100644 --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c @@ -575,6 +575,8 @@ static int p9_virtio_probe

[PATCH v3 10/25] virtio: add API to enable VQs early

2014-10-12 Thread Michael S. Tsirkin
early callers to become spec compliant and eventually support non-transitional devices. Add API for drivers to call before using VQs. Sets DRIVER_OK internally. Signed-off-by: Michael S. Tsirkin m...@redhat.com Reviewed-by: Cornelia Huck cornelia.h...@de.ibm.com --- include/linux/virtio_config.h

[PATCH v3 04/25] virtio: defer config changed notifications

2014-10-12 Thread Michael S. Tsirkin
DRIVER_OK: previously, the callback could race with driver-specific initialization. This will also help simplify drivers. Signed-off-by: Michael S. Tsirkin m...@redhat.com Reviewed-by: Cornelia Huck cornelia.h...@de.ibm.com --- include/linux/virtio.h | 6 ++ drivers/virtio/virtio.c | 57

[PATCH v3 05/25] virtio_blk: drop config_enable

2014-10-12 Thread Michael S. Tsirkin
notifications. Signed-off-by: Michael S. Tsirkin m...@redhat.com Reviewed-by: Cornelia Huck cornelia.h...@de.ibm.com --- drivers/block/virtio_blk.c | 23 --- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index

[PATCH v3 06/25] virtio-blk: drop config_mutex

2014-10-12 Thread Michael S. Tsirkin
gone. Get rid of the unnecessary lock. Signed-off-by: Michael S. Tsirkin m...@redhat.com Reviewed-by: Cornelia Huck cornelia.h...@de.ibm.com --- drivers/block/virtio_blk.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index

[PATCH v3 03/25] virtio-pci: move freeze/restore to virtio core

2014-10-12 Thread Michael S. Tsirkin
This is in preparation to extending config changed event handling in core. Wrapping these in an API also seems to make for a cleaner code. Signed-off-by: Michael S. Tsirkin m...@redhat.com Reviewed-by: Cornelia Huck cornelia.h...@de.ibm.com --- include/linux/virtio.h | 6 + drivers

[PATCH v3 08/25] virtio-net: drop config_mutex

2014-10-12 Thread Michael S. Tsirkin
gone. Get rid of the unnecessary lock. Signed-off-by: Michael S. Tsirkin m...@redhat.com Reviewed-by: Cornelia Huck cornelia.h...@de.ibm.com --- drivers/net/virtio_net.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c

[PATCH v3 00/25] virtio: fix spec compliance issues

2014-10-12 Thread Michael S. Tsirkin
rng. It's possible to modify it trivially and then drop scan callback from core, but I'm rather inclined to look at ways to make some rng core changes so that we don't need to have so many variables tracking device state. So this is deferred for now. Michael S. Tsirkin (24): virtio_pci: fix virtio

[PATCH v3 02/25] virtio: unify config_changed handling

2014-10-12 Thread Michael S. Tsirkin
not look like a big deal. See also commit 3fff0179e33cd7d0a688dab65700c46ad089e934 virtio-pci: do not oops on config change if driver not loaded. for the original motivation behind the driver check. Signed-off-by: Michael S. Tsirkin m...@redhat.com Reviewed-by: Cornelia Huck cornelia.h

[PATCH v3 01/25] virtio_pci: fix virtio spec compliance on restore

2014-10-12 Thread Michael S. Tsirkin
This behaviour will break with hypervisors that assume spec compliant behaviour. It seems like a good idea to have this patch applied to stable branches to reduce the support butden for the hypervisors. Cc: sta...@vger.kernel.org Cc: Amit Shah amit.s...@redhat.com Signed-off-by: Michael S. Tsirkin m

Re: [PATCH v3 10/25] virtio: add API to enable VQs early

2014-10-13 Thread Michael S. Tsirkin
On Mon, Oct 13, 2014 at 05:22:39PM +1030, Rusty Russell wrote: Michael S. Tsirkin m...@redhat.com writes: virtio spec 0.9.X requires DRIVER_OK to be set before VQs are used, but some drivers use VQs before probe function returns. Since DRIVER_OK is set after probe, this violates the spec

[PATCH v4 00/25] virtio: fix spec compliance issues

2014-10-13 Thread Michael S. Tsirkin
it trivially and then drop scan callback from core, but I'm rather inclined to look at ways to make some rng core changes so that we don't need to have so many variables tracking device state. So this is deferred for now. Michael S. Tsirkin (24): virtio_pci: fix virtio spec compliance on restore

[PATCH v4 02/25] virtio: unify config_changed handling

2014-10-13 Thread Michael S. Tsirkin
not look like a big deal. See also commit 3fff0179e33cd7d0a688dab65700c46ad089e934 virtio-pci: do not oops on config change if driver not loaded. for the original motivation behind the driver check. Signed-off-by: Michael S. Tsirkin m...@redhat.com Reviewed-by: Cornelia Huck cornelia.h

[PATCH v4 01/25] virtio_pci: fix virtio spec compliance on restore

2014-10-13 Thread Michael S. Tsirkin
This behaviour will break with hypervisors that assume spec compliant behaviour. It seems like a good idea to have this patch applied to stable branches to reduce the support butden for the hypervisors. Cc: sta...@vger.kernel.org Cc: Amit Shah amit.s...@redhat.com Signed-off-by: Michael S. Tsirkin m

[PATCH v4 03/25] virtio-pci: move freeze/restore to virtio core

2014-10-13 Thread Michael S. Tsirkin
This is in preparation to extending config changed event handling in core. Wrapping these in an API also seems to make for a cleaner code. Signed-off-by: Michael S. Tsirkin m...@redhat.com Reviewed-by: Cornelia Huck cornelia.h...@de.ibm.com --- include/linux/virtio.h | 6 + drivers

[PATCH v4 05/25] virtio_blk: drop config_enable

2014-10-13 Thread Michael S. Tsirkin
notifications. Signed-off-by: Michael S. Tsirkin m...@redhat.com Reviewed-by: Cornelia Huck cornelia.h...@de.ibm.com --- drivers/block/virtio_blk.c | 23 --- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index

[PATCH v4 24/25] virtio_scsi: drop scan callback

2014-10-13 Thread Michael S. Tsirkin
Enable VQs early like we do for restore. This makes it possible to drop the scan callback, moving scanning into the probe function, and making code simpler. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/scsi/virtio_scsi.c | 23 +++ 1 file changed, 7 insertions

[PATCH v4 25/25] virtio-rng: refactor probe error handling

2014-10-13 Thread Michael S. Tsirkin
Code like vi-vq = NULL; kfree(vi) does not make sense. Clean it up, use goto error labels for cleanup. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/char/hw_random/virtio-rng.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git

[PATCH v4 22/25] virtio_scsi: fix race on device removal

2014-10-13 Thread Michael S. Tsirkin
We cancel event work on device removal, but an interrupt could trigger immediately after this, and queue it again. To fix, set a flag. Loosely based on patch by Paolo Bonzini Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/scsi

[PATCH v4 21/25] virito_scsi: use freezable WQ for events

2014-10-13 Thread Michael S. Tsirkin
From: Paolo Bonzini pbonz...@redhat.com Michael S. Tsirkin noticed a race condition: we reset device on freeze, but system WQ is still running so it might try adding bufs to a VQ meanwhile. To fix, switch to handling events from the freezable WQ. Reported-by: Michael S. Tsirkin m...@redhat.com

[PATCH v4 23/25] virtio_balloon: enable VQs early on restore

2014-10-13 Thread Michael S. Tsirkin
virtio spec requires drivers to set DRIVER_OK before using VQs. This is set automatically after resume returns, virtio balloon violated this rule by adding bufs, which causes the VQ to be used directly within restore. To fix, call virtio_device_ready before using VQ. Signed-off-by: Michael S

[PATCH v4 14/25] 9p/trans_virtio: enable VQs early

2014-10-13 Thread Michael S. Tsirkin
-by: Michael S. Tsirkin m...@redhat.com --- net/9p/trans_virtio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index 6940d8f..766ba48 100644 --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c @@ -575,6 +575,8 @@ static int p9_virtio_probe(struct

[PATCH v4 20/25] virtio_net: enable VQs early on restore

2014-10-13 Thread Michael S. Tsirkin
virtio spec requires drivers to set DRIVER_OK before using VQs. This is set automatically after restore returns, virtio net violated this rule by using receive VQs within restore. To fix, call virtio_device_ready before using VQs. Signed-off-by: Michael S. Tsirkin m...@redhat.com Reviewed

[PATCH v4 18/25] virtio_scsi: enable VQs early on restore

2014-10-13 Thread Michael S. Tsirkin
virtio spec requires drivers to set DRIVER_OK before using VQs. This is set automatically after restore returns, virtio scsi violated this rule on restore by kicking event vq within restore. To fix, call virtio_device_ready before using event queue. Signed-off-by: Michael S. Tsirkin m

[PATCH v4 16/25] virtio_scsi: move kick event out from virtscsi_init

2014-10-13 Thread Michael S. Tsirkin
We currently kick event within virtscsi_init, before host is fully initialized. This can in theory confuse guest if device consumes the buffers immediately. To fix, move virtscsi_kick_event_all out to scan/restore. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/scsi

[PATCH v4 17/25] virtio_blk: enable VQs early on restore

2014-10-13 Thread Michael S. Tsirkin
starting queues. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/block/virtio_blk.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 46b04bf..1c95af5 100644 --- a/drivers/block/virtio_blk.c +++ b

[PATCH v4 19/25] virtio_console: enable VQs early on restore

2014-10-13 Thread Michael S. Tsirkin
virtio spec requires drivers to set DRIVER_OK before using VQs. This is set automatically after resume returns, virtio console violated this rule by adding inbufs, which causes the VQ to be used directly within restore. To fix, call virtio_device_ready before using VQs. Signed-off-by: Michael S

[PATCH v4 13/25] virtio_console: enable VQs early

2014-10-13 Thread Michael S. Tsirkin
virtio spec requires drivers to set DRIVER_OK before using VQs. This is set automatically after probe returns, virtio console violated this rule by adding inbufs, which causes the VQ to be used directly within probe. To fix, call virtio_device_ready before using VQs. Signed-off-by: Michael S

[PATCH v4 12/25] virtio_blk: enable VQs early

2014-10-13 Thread Michael S. Tsirkin
virtio spec requires drivers to set DRIVER_OK before using VQs. This is set automatically after probe returns, virtio block violated this rule by calling add_disk, which causes the VQ to be used directly within probe. To fix, call virtio_device_ready before using VQs. Signed-off-by: Michael S

[PATCH v4 09/25] virtio_net: minor cleanup

2014-10-13 Thread Michael S. Tsirkin
goto done; done: return; is ugly, it was put there to make diff review easier. replace by open-coded return. Signed-off-by: Michael S. Tsirkin m...@redhat.com Acked-by: Cornelia Huck cornelia.h...@de.ibm.com --- drivers/net/virtio_net.c | 6 ++ 1 file changed, 2 insertions

[PATCH v4 08/25] virtio-net: drop config_mutex

2014-10-13 Thread Michael S. Tsirkin
gone. Get rid of the unnecessary lock. Signed-off-by: Michael S. Tsirkin m...@redhat.com Reviewed-by: Cornelia Huck cornelia.h...@de.ibm.com --- drivers/net/virtio_net.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c

[PATCH v4 11/25] virtio_net: enable VQs early

2014-10-13 Thread Michael S. Tsirkin
virtio spec requires drivers to set DRIVER_OK before using VQs. This is set automatically after probe returns, virtio net violated this rule by using receive VQs within probe. To fix, call virtio_device_ready before using VQs. Signed-off-by: Michael S. Tsirkin m...@redhat.com Reviewed

[PATCH v4 06/25] virtio-blk: drop config_mutex

2014-10-13 Thread Michael S. Tsirkin
gone. Get rid of the unnecessary lock. Signed-off-by: Michael S. Tsirkin m...@redhat.com Reviewed-by: Cornelia Huck cornelia.h...@de.ibm.com --- drivers/block/virtio_blk.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index

Re: [PATCH v4 04/25] virtio: defer config changed notifications

2014-10-14 Thread Michael S. Tsirkin
On Tue, Oct 14, 2014 at 11:01:12AM +1030, Rusty Russell wrote: Michael S. Tsirkin m...@redhat.com writes: Defer config changed notifications that arrive during probe/scan/freeze/restore. This will allow drivers to set DRIVER_OK earlier, without worrying about racing with config change

Re: [PATCH v4 13/25] virtio_console: enable VQs early

2014-10-20 Thread Michael S. Tsirkin
On Mon, Oct 20, 2014 at 01:07:50PM +0100, Thomas Graf wrote: On 10/13/14 at 10:50am, Michael S. Tsirkin wrote: virtio spec requires drivers to set DRIVER_OK before using VQs. This is set automatically after probe returns, virtio console violated this rule by adding inbufs, which causes

Re: [PATCH v4 13/25] virtio_console: enable VQs early

2014-10-20 Thread Michael S. Tsirkin
On Mon, Oct 20, 2014 at 04:10:16PM +0300, Michael S. Tsirkin wrote: On Mon, Oct 20, 2014 at 01:07:50PM +0100, Thomas Graf wrote: On 10/13/14 at 10:50am, Michael S. Tsirkin wrote: virtio spec requires drivers to set DRIVER_OK before using VQs. This is set automatically after probe returns

Re: [PATCH v4 13/25] virtio_console: enable VQs early

2014-10-20 Thread Michael S. Tsirkin
On Mon, Oct 20, 2014 at 02:42:23PM +0200, Cornelia Huck wrote: On Mon, 20 Oct 2014 13:07:50 +0100 Thomas Graf tg...@suug.ch wrote: On 10/13/14 at 10:50am, Michael S. Tsirkin wrote: virtio spec requires drivers to set DRIVER_OK before using VQs. This is set automatically after probe

Re: [PATCH v4 13/25] virtio_console: enable VQs early

2014-10-20 Thread Michael S. Tsirkin
On Mon, Oct 20, 2014 at 04:35:55PM +0300, Michael S. Tsirkin wrote: On Mon, Oct 20, 2014 at 02:42:23PM +0200, Cornelia Huck wrote: On Mon, 20 Oct 2014 13:07:50 +0100 Thomas Graf tg...@suug.ch wrote: On 10/13/14 at 10:50am, Michael S. Tsirkin wrote: virtio spec requires drivers

Re: [PATCH] vhost-scsi: Take configfs group dependency during VHOST_SCSI_SET_ENDPOINT

2014-10-21 Thread Michael S. Tsirkin
On Tue, Oct 21, 2014 at 12:05:31PM -0700, Nicholas A. Bellinger wrote: Hey Paolo, On Thu, 2014-10-09 at 12:49 +0200, Paolo Bonzini wrote: Il 09/10/2014 10:49, Paolo Bonzini ha scritto: It does not happen if you close QEMU with SIGTERM, ctrl-c, or with the quit command, because no

Re: [PATCH v4 10/25] virtio: add API to enable VQs early

2014-11-10 Thread Michael S. Tsirkin
On Mon, Nov 10, 2014 at 04:45:09PM -0800, Andy Grover wrote: On 10/13/2014 12:50 AM, Michael S. Tsirkin wrote: virtio spec 0.9.X requires DRIVER_OK to be set before VQs are used, but some drivers use VQs before probe function returns. Since DRIVER_OK is set after probe, this violates the spec

[PATCH v3 37/41] virtio_scsi: v1.0 support

2014-11-24 Thread Michael S. Tsirkin
Note: for consistency, and to avoid sparse errors, convert all fields, even those no longer in use for virtio v1.0. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- include/linux/virtio_scsi.h | 32 +++- drivers/scsi/virtio_scsi.c | 51

[PATCH v4 38/42] virtio_scsi: v1.0 support

2014-11-25 Thread Michael S. Tsirkin
Note: for consistency, and to avoid sparse errors, convert all fields, even those no longer in use for virtio v1.0. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- include/linux/virtio_scsi.h | 32 +++- drivers/scsi/virtio_scsi.c | 51

Re: [PATCH v4 38/42] virtio_scsi: v1.0 support

2014-11-26 Thread Michael S. Tsirkin
On Wed, Nov 26, 2014 at 03:51:03PM +0100, Cornelia Huck wrote: On Tue, 25 Nov 2014 18:44:08 +0200 Michael S. Tsirkin m...@redhat.com wrote: Note: for consistency, and to avoid sparse errors, convert all fields, even those no longer in use for virtio v1.0. Signed-off-by: Michael

[PATCH v5 41/45] virtio_scsi: v1.0 support

2014-11-27 Thread Michael S. Tsirkin
Note: for consistency, and to avoid sparse errors, convert all fields, even those no longer in use for virtio v1.0. Signed-off-by: Michael S. Tsirkin m...@redhat.com Acked-by: Paolo Bonzini pbonz...@redhat.com --- include/linux/virtio_scsi.h | 32 +++- drivers/scsi

[PATCH v6 42/46] virtio_scsi: v1.0 support

2014-11-27 Thread Michael S. Tsirkin
Note: for consistency, and to avoid sparse errors, convert all fields, even those no longer in use for virtio v1.0. Signed-off-by: Michael S. Tsirkin m...@redhat.com Acked-by: Paolo Bonzini pbonz...@redhat.com --- include/linux/virtio_scsi.h | 32 +++- drivers/scsi

[PATCH v7 42/46] virtio_scsi: v1.0 support

2014-11-30 Thread Michael S. Tsirkin
Note: for consistency, and to avoid sparse errors, convert all fields, even those no longer in use for virtio v1.0. Signed-off-by: Michael S. Tsirkin m...@redhat.com Acked-by: Paolo Bonzini pbonz...@redhat.com --- include/linux/virtio_scsi.h | 32 +++- drivers/scsi

Re: [PATCH v7 42/46] virtio_scsi: v1.0 support

2014-12-01 Thread Michael S. Tsirkin
On Mon, Dec 01, 2014 at 01:50:01PM +0100, Cornelia Huck wrote: On Sun, 30 Nov 2014 17:12:47 +0200 Michael S. Tsirkin m...@redhat.com wrote: Note: for consistency, and to avoid sparse errors, convert all fields, even those no longer in use for virtio v1.0. Signed-off-by: Michael

Re: [PATCH v7 42/46] virtio_scsi: v1.0 support

2014-12-01 Thread Michael S. Tsirkin
On Mon, Dec 01, 2014 at 02:53:05PM +0200, Michael S. Tsirkin wrote: On Mon, Dec 01, 2014 at 01:50:01PM +0100, Cornelia Huck wrote: On Sun, 30 Nov 2014 17:12:47 +0200 Michael S. Tsirkin m...@redhat.com wrote: Note: for consistency, and to avoid sparse errors, convert all fields

[PATCH v8 50/50] virtio: drop VIRTIO_F_VERSION_1 from drivers

2014-12-01 Thread Michael S. Tsirkin
Core activates this bit automatically now, drop it from drivers that set it explicitly. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/block/virtio_blk.c| 1 - drivers/char/virtio_console.c | 1 - drivers/net/virtio_net.c | 1 - drivers/scsi/virtio_scsi.c| 1 - 4

[PATCH v8 42/50] virtio_scsi: v1.0 support

2014-12-01 Thread Michael S. Tsirkin
Note: for consistency, and to avoid sparse errors, convert all fields, even those no longer in use for virtio v1.0. Signed-off-by: Michael S. Tsirkin m...@redhat.com Acked-by: Paolo Bonzini pbonz...@redhat.com --- include/linux/virtio_scsi.h | 32 +++- drivers/scsi

Re: [PATCH 4/4] tcm_vhost: Convert I/O path to use target_submit_cmd_map_mem

2012-10-02 Thread Michael S. Tsirkin
in vhost_scsi_allocate_cmd() used from cmwq process context I/O submission within tcm_vhost_submission_work() Reported-by: Christoph Hellwig h...@lst.de Cc: Christoph Hellwig h...@lst.de Cc: Michael S. Tsirkin m...@redhat.com Cc: Paolo Bonzini pbonz...@redhat.com Cc: Stefan Hajnoczi stefa

Re: [PATCH 0/4] target: Add target_submit_cmd_map_mem and convert tcm_loop+tcm_vhost

2012-10-02 Thread Michael S. Tsirkin
On Tue, Oct 02, 2012 at 07:15:43AM +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org Hi hch Co, This series adds a new target_submit_cmd_map_mem() caller to accept pre-allocated SGL memory within the core generic I/O submission path. Patch #1 contains the

Re: [PATCH v2 1/5] virtio: add functions for piecewise addition of buffers

2012-12-18 Thread Michael S. Tsirkin
Some comments without arguing about whether the performance benefit is worth it. On Tue, Dec 18, 2012 at 01:32:48PM +0100, Paolo Bonzini wrote: diff --git a/include/linux/virtio.h b/include/linux/virtio.h index cf8adb1..39d56c4 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h

Re: [PATCH v2 2/5] virtio-scsi: use functions for piecewise composition of buffers

2012-12-18 Thread Michael S. Tsirkin
On Tue, Dec 18, 2012 at 01:32:49PM +0100, Paolo Bonzini wrote: Using the new virtio_scsi_add_sg function lets us simplify the queueing path. In particular, all data protected by the tgt_lock is just gone (multiqueue will find a new use for the lock). vq access still needs some protection:

Re: [PATCH v2 0/5] Multiqueue virtio-scsi, and API for piecewise buffer submission

2012-12-18 Thread Michael S. Tsirkin
On Tue, Dec 18, 2012 at 01:32:47PM +0100, Paolo Bonzini wrote: Hi all, this series adds multiqueue support to the virtio-scsi driver, based on Jason Wang's work on virtio-net. It uses a simple queue steering algorithm that expects one queue per CPU. LUNs in the same target always use the

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

2012-12-18 Thread Michael S. Tsirkin
On Tue, Dec 18, 2012 at 01:32:52PM +0100, 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

Re: [PATCH v2 1/5] virtio: add functions for piecewise addition of buffers

2012-12-18 Thread Michael S. Tsirkin
On Tue, Dec 18, 2012 at 02:43:51PM +0100, Paolo Bonzini wrote: Il 18/12/2012 14:36, Michael S. Tsirkin ha scritto: Some comments without arguing about whether the performance benefit is worth it. On Tue, Dec 18, 2012 at 01:32:48PM +0100, Paolo Bonzini wrote: diff --git a/include/linux

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

2012-12-18 Thread Michael S. Tsirkin
On Tue, Dec 18, 2012 at 03:08:08PM +0100, Paolo Bonzini wrote: Il 18/12/2012 14:57, Michael S. Tsirkin ha scritto: -static int virtscsi_queuecommand(struct Scsi_Host *sh, struct scsi_cmnd *sc) +static int virtscsi_queuecommand(struct virtio_scsi *vscsi, + struct

Re: [PATCH v2 1/5] virtio: add functions for piecewise addition of buffers

2012-12-18 Thread Michael S. Tsirkin
On Tue, Dec 18, 2012 at 03:32:15PM +0100, Paolo Bonzini wrote: Il 18/12/2012 14:59, Michael S. Tsirkin ha scritto: Can't we track state internally to the virtqueue? Exposing it seems to buy us nothing since you can't call add_buf between start and end anyway. I wanted to keep the state

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

2012-12-18 Thread Michael S. Tsirkin
On Tue, Dec 18, 2012 at 04:51:28PM +0100, Paolo Bonzini wrote: Il 18/12/2012 16:03, Michael S. Tsirkin ha scritto: On Tue, Dec 18, 2012 at 03:08:08PM +0100, Paolo Bonzini wrote: Il 18/12/2012 14:57, Michael S. Tsirkin ha scritto: -static int virtscsi_queuecommand(struct Scsi_Host *sh

Re: [PATCH v2 0/5] Multiqueue virtio-scsi, and API for piecewise buffer submission

2012-12-19 Thread Michael S. Tsirkin
On Wed, Dec 19, 2012 at 09:52:59AM +0100, Paolo Bonzini wrote: Il 18/12/2012 23:18, Rolf Eike Beer ha scritto: Paolo Bonzini wrote: Hi all, this series adds multiqueue support to the virtio-scsi driver, based on Jason Wang's work on virtio-net. It uses a simple queue steering

Re: [PATCH v2 1/5] virtio: add functions for piecewise addition of buffers

2012-12-19 Thread Michael S. Tsirkin
On Wed, Dec 19, 2012 at 01:04:08PM +0100, Paolo Bonzini wrote: Il 19/12/2012 11:47, Stefan Hajnoczi ha scritto: On Tue, Dec 18, 2012 at 01:32:48PM +0100, Paolo Bonzini wrote: +/** + * virtqueue_start_buf - start building buffer for the other end + * @vq: the struct virtqueue we're talking

Re: [PATCH v2 1/5] virtio: add functions for piecewise addition of buffers

2012-12-19 Thread Michael S. Tsirkin
On Wed, Dec 19, 2012 at 06:51:30PM +0200, Michael S. Tsirkin wrote: On Wed, Dec 19, 2012 at 01:04:08PM +0100, Paolo Bonzini wrote: Il 19/12/2012 11:47, Stefan Hajnoczi ha scritto: On Tue, Dec 18, 2012 at 01:32:48PM +0100, Paolo Bonzini wrote: +/** + * virtqueue_start_buf - start

Re: [PATCH] vhost/scsi: Fix incorrect usage of get_user_pages_fast write parameter

2013-10-28 Thread Michael S. Tsirkin
- WRITE payload case. This bug would manifest itself as random process segmentation faults on KVM host after repeated vhost starts + stops and/or with lots of vhost endpoints + LUNs. Cc: Stefan Hajnoczi stefa...@redhat.com Cc: Michael S. Tsirkin m...@redhat.com Cc: Asias He

Re: [PATCH 6/6] virtio-scsi: Enable DIF/DIX modes in SCSI host LLD

2014-04-07 Thread Michael S. Tsirkin
protection buffer come before data buffer (Paolo) - Enable virtio_scsi_cmd_req_pi usage (Paolo) Cc: Paolo Bonzini pbonz...@redhat.com Cc: Michael S. Tsirkin m...@redhat.com Cc: Martin K. Petersen martin.peter...@oracle.com Cc: Christoph Hellwig h...@lst.de Cc: Hannes Reinecke h...@suse.de Cc

Re: [PATCH 6/6] virtio-scsi: Enable DIF/DIX modes in SCSI host LLD

2014-04-07 Thread Michael S. Tsirkin
On Mon, Apr 07, 2014 at 01:56:59AM -0700, Nicholas A. Bellinger wrote: On Mon, 2014-04-07 at 11:45 +0300, Michael S. Tsirkin wrote: On Sun, Apr 06, 2014 at 09:32:09PM +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org This patch updates virtscsi_probe

Re: [PATCH 1/6] virtio-scsi.h: Add virtio_scsi_cmd_req_pi + VIRTIO_SCSI_F_T10_PI bits

2014-04-07 Thread Michael S. Tsirkin
are expected to preceed the data buffers. Also add new VIRTIO_SCSI_F_T10_PI feature bit to be used to signal host support. Cc: Paolo Bonzini pbonz...@redhat.com Cc: Michael S. Tsirkin m...@redhat.com Cc: Martin K. Petersen martin.peter...@oracle.com Cc: Christoph Hellwig h...@lst.de Cc

Re: [PATCH 1/6] virtio-scsi.h: Add virtio_scsi_cmd_req_pi + VIRTIO_SCSI_F_T10_PI bits

2014-04-09 Thread Michael S. Tsirkin
On Tue, Apr 08, 2014 at 04:31:26PM -0400, Paolo Bonzini wrote: Il 07/04/2014 05:55, Michael S. Tsirkin ha scritto: + u16 do_pi_niov; /* DataOUT PI Number of iovecs */ + u16 di_pi_niov; /* DataIN PI Number of iovecs */ So this looks like a somewhat problematic interface to me

Re: [PATCH 6/6] virtio-scsi: Enable DIF/DIX modes in SCSI host LLD

2014-05-07 Thread Michael S. Tsirkin
On Mon, Apr 07, 2014 at 01:56:59AM -0700, Nicholas A. Bellinger wrote: On Mon, 2014-04-07 at 11:45 +0300, Michael S. Tsirkin wrote: On Sun, Apr 06, 2014 at 09:32:09PM +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org This patch updates virtscsi_probe

Re: [PATCH 6/6] virtio-scsi: Enable DIF/DIX modes in SCSI host LLD

2014-05-19 Thread Michael S. Tsirkin
On Mon, May 19, 2014 at 12:07:03PM -0700, Nicholas A. Bellinger wrote: On Wed, 2014-05-07 at 12:13 +0300, Michael S. Tsirkin wrote: On Mon, Apr 07, 2014 at 01:56:59AM -0700, Nicholas A. Bellinger wrote: On Mon, 2014-04-07 at 11:45 +0300, Michael S. Tsirkin wrote: On Sun, Apr 06, 2014

Re: [PATCH 6/6] virtio-scsi: Enable DIF/DIX modes in SCSI host LLD

2014-05-19 Thread Michael S. Tsirkin
On Mon, May 19, 2014 at 01:54:50PM -0700, Nicholas A. Bellinger wrote: On Mon, 2014-05-19 at 22:15 +0300, Michael S. Tsirkin wrote: On Mon, May 19, 2014 at 12:07:03PM -0700, Nicholas A. Bellinger wrote: On Wed, 2014-05-07 at 12:13 +0300, Michael S. Tsirkin wrote: On Mon, Apr 07, 2014

Re: [PATCH-v2 1/6] virtio-scsi.h: Add virtio_scsi_cmd_req_pi + VIRTIO_SCSI_F_T10_PI bits

2014-05-22 Thread Michael S. Tsirkin
commit log, move it out to notes (after ---) - Use pi_bytesout + pi_bytesin instead of niovs (mst + paolo) Right, so maybe update the commit log above to match? It gave me pause. Cc: Paolo Bonzini pbonz...@redhat.com Cc: Michael S. Tsirkin m...@redhat.com Cc: Martin K. Petersen martin.peter

[PATCH trivial] include linux/mutex.h from scsi_transport_iscsi.h

2007-07-25 Thread Michael S. Tsirkin
scsi/scsi_transport_iscsi.h uses struct mutex, so while linux/mutex.h seems to be pulled in indirectly by one of the headers it includes, the right thing is to include linux/mutex.h directly. Signed-off-by: Michael S. Tsirkin [EMAIL PROTECTED] --- diff --git a/include/scsi

Re: [PATCH trivial] include linux/mutex.h from scsi_transport_iscsi.h

2007-07-25 Thread Michael S. Tsirkin
Quoting Mike Christie [EMAIL PROTECTED]: Subject: Re: [PATCH trivial] include linux/mutex.h from scsi_transport_iscsi.h Michael S. Tsirkin wrote: scsi/scsi_transport_iscsi.h uses struct mutex, so while linux/mutex.h seems to be pulled in indirectly by one of the headers it includes

[PATCH trivial v2] add includes to scsi_transport_iscsi.h

2007-07-26 Thread Michael S. Tsirkin
scsi/scsi_transport_iscsi.h uses struct mutex and struct list_head, so while linux/mutex.h and linux/list.h seem to be pulled in indirectly by one of the headers it includes, the right thing is to include linux/mutex.h and linus/list.h directly. Signed-off-by: Michael S. Tsirkin [EMAIL PROTECTED

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

2012-07-17 Thread Michael S. Tsirkin
On Wed, Jul 11, 2012 at 09:15:00PM +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org 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

Re: [PATCH RESEND 0/5] Add vhost-blk support

2012-07-17 Thread Michael S. Tsirkin
On Fri, Jul 13, 2012 at 04:55:06PM +0800, Asias He wrote: Hi folks, [I am resending to fix the broken thread in the previous one.] This patchset adds vhost-blk support. vhost-blk is a in kernel virito-blk device accelerator. Compared to userspace virtio-blk implementation, vhost-blk

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

2012-07-17 Thread Michael S. Tsirkin
On Tue, Jul 17, 2012 at 01:55:42PM -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: From: Nicholas Bellingern...@linux-iscsi.org Hi folks, The following is a RFC-v2 series of tcm_vhost

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

2012-07-17 Thread Michael S. Tsirkin
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: From: Nicholas Bellinger n...@linux-iscsi.org Hi folks, The following

  1   2   >