All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hw/virtio-scsi: Set max_target=0 during vhost-scsi operation
@ 2012-07-11 20:55 ` Nicholas A. Bellinger
  0 siblings, 0 replies; 20+ messages in thread
From: Nicholas A. Bellinger @ 2012-07-11 20:55 UTC (permalink / raw)
  To: qemu-devel
  Cc: target-devel, lf-virt, kvm-devel, Stefan Hajnoczi, Zhi Yong Wu,
	Paolo Bonzini, Michael S. Tsirkin, Nicholas Bellinger,
	Zhi Yong Wu

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

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 only attempts to scan target IDs up to
VIRTIO_SCSI_MAX_TARGET when connected via virtio-scsi-raw.

It's currently cut against Zhi's qemu vhost-scsi tree here:

   https://github.com/wuzhy/qemu/tree/vhost-scsi

Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Cc: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
---
 hw/virtio-scsi.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/hw/virtio-scsi.c b/hw/virtio-scsi.c
index e38cdd0..71276b6 100644
--- a/hw/virtio-scsi.c
+++ b/hw/virtio-scsi.c
@@ -523,7 +523,11 @@ static void virtio_scsi_get_config(VirtIODevice *vdev,
     stl_raw(&scsiconf->sense_size, s->sense_size);
     stl_raw(&scsiconf->cdb_size, s->cdb_size);
     stl_raw(&scsiconf->max_channel, VIRTIO_SCSI_MAX_CHANNEL);
-    stl_raw(&scsiconf->max_target, VIRTIO_SCSI_MAX_TARGET);
+    if (s->vhost_scsi) {
+        stl_raw(&scsiconf->max_target, 0);
+    } else {
+        stl_raw(&scsiconf->max_target, VIRTIO_SCSI_MAX_TARGET);
+    }
     stl_raw(&scsiconf->max_lun, VIRTIO_SCSI_MAX_LUN);
 }
 
-- 
1.7.2.5


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

* [Qemu-devel] [PATCH] hw/virtio-scsi: Set max_target=0 during vhost-scsi operation
@ 2012-07-11 20:55 ` Nicholas A. Bellinger
  0 siblings, 0 replies; 20+ messages in thread
From: Nicholas A. Bellinger @ 2012-07-11 20:55 UTC (permalink / raw)
  To: qemu-devel
  Cc: Stefan Hajnoczi, kvm-devel, Michael S. Tsirkin, Zhi Yong Wu,
	Nicholas Bellinger, Zhi Yong Wu, target-devel, Paolo Bonzini,
	lf-virt

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

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 only attempts to scan target IDs up to
VIRTIO_SCSI_MAX_TARGET when connected via virtio-scsi-raw.

It's currently cut against Zhi's qemu vhost-scsi tree here:

   https://github.com/wuzhy/qemu/tree/vhost-scsi

Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Cc: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
---
 hw/virtio-scsi.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/hw/virtio-scsi.c b/hw/virtio-scsi.c
index e38cdd0..71276b6 100644
--- a/hw/virtio-scsi.c
+++ b/hw/virtio-scsi.c
@@ -523,7 +523,11 @@ static void virtio_scsi_get_config(VirtIODevice *vdev,
     stl_raw(&scsiconf->sense_size, s->sense_size);
     stl_raw(&scsiconf->cdb_size, s->cdb_size);
     stl_raw(&scsiconf->max_channel, VIRTIO_SCSI_MAX_CHANNEL);
-    stl_raw(&scsiconf->max_target, VIRTIO_SCSI_MAX_TARGET);
+    if (s->vhost_scsi) {
+        stl_raw(&scsiconf->max_target, 0);
+    } else {
+        stl_raw(&scsiconf->max_target, VIRTIO_SCSI_MAX_TARGET);
+    }
     stl_raw(&scsiconf->max_lun, VIRTIO_SCSI_MAX_LUN);
 }
 
-- 
1.7.2.5

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

* Re: [PATCH] hw/virtio-scsi: Set max_target=0 during vhost-scsi operation
  2012-07-11 20:55 ` [Qemu-devel] " Nicholas A. Bellinger
@ 2012-07-12  5:34   ` Zhi Yong Wu
  -1 siblings, 0 replies; 20+ messages in thread
From: Zhi Yong Wu @ 2012-07-12  5:34 UTC (permalink / raw)
  To: linux-iscsi-target-dev
  Cc: qemu-devel, target-devel, lf-virt, kvm-devel, Stefan Hajnoczi,
	Zhi Yong Wu, Paolo Bonzini, Michael S. Tsirkin,
	Nicholas Bellinger, Zhi Yong Wu

HI,

Do we need to maintain one QEMU branch to collect all useful latest
patches for tcm_vhost support?  You know, those patches will not get
merged into qemu.git/master.


On Thu, Jul 12, 2012 at 4:55 AM, Nicholas A. Bellinger
<nab@linux-iscsi.org> wrote:
> From: Nicholas Bellinger <nab@linux-iscsi.org>
>
> 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 only attempts to scan target IDs up to
> VIRTIO_SCSI_MAX_TARGET when connected via virtio-scsi-raw.
>
> It's currently cut against Zhi's qemu vhost-scsi tree here:
>
>    https://github.com/wuzhy/qemu/tree/vhost-scsi
>
> Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
> Cc: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
> ---
>  hw/virtio-scsi.c |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/hw/virtio-scsi.c b/hw/virtio-scsi.c
> index e38cdd0..71276b6 100644
> --- a/hw/virtio-scsi.c
> +++ b/hw/virtio-scsi.c
> @@ -523,7 +523,11 @@ static void virtio_scsi_get_config(VirtIODevice *vdev,
>      stl_raw(&scsiconf->sense_size, s->sense_size);
>      stl_raw(&scsiconf->cdb_size, s->cdb_size);
>      stl_raw(&scsiconf->max_channel, VIRTIO_SCSI_MAX_CHANNEL);
> -    stl_raw(&scsiconf->max_target, VIRTIO_SCSI_MAX_TARGET);
> +    if (s->vhost_scsi) {
> +        stl_raw(&scsiconf->max_target, 0);
> +    } else {
> +        stl_raw(&scsiconf->max_target, VIRTIO_SCSI_MAX_TARGET);
> +    }
>      stl_raw(&scsiconf->max_lun, VIRTIO_SCSI_MAX_LUN);
>  }
>
> --
> 1.7.2.5
>
> --
> You received this message because you are subscribed to the Google Groups "Linux-iSCSI.org Target Development" group.
> To post to this group, send email to linux-iscsi-target-dev@googlegroups.com.
> To unsubscribe from this group, send email to linux-iscsi-target-dev+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/linux-iscsi-target-dev?hl=en.
>



-- 
Regards,

Zhi Yong Wu

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

* Re: [Qemu-devel] [PATCH] hw/virtio-scsi: Set max_target=0 during vhost-scsi operation
@ 2012-07-12  5:34   ` Zhi Yong Wu
  0 siblings, 0 replies; 20+ messages in thread
From: Zhi Yong Wu @ 2012-07-12  5:34 UTC (permalink / raw)
  To: linux-iscsi-target-dev
  Cc: Stefan Hajnoczi, kvm-devel, Michael S. Tsirkin, Zhi Yong Wu,
	qemu-devel, Nicholas Bellinger, Zhi Yong Wu, target-devel,
	Paolo Bonzini, lf-virt

HI,

Do we need to maintain one QEMU branch to collect all useful latest
patches for tcm_vhost support?  You know, those patches will not get
merged into qemu.git/master.


On Thu, Jul 12, 2012 at 4:55 AM, Nicholas A. Bellinger
<nab@linux-iscsi.org> wrote:
> From: Nicholas Bellinger <nab@linux-iscsi.org>
>
> 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 only attempts to scan target IDs up to
> VIRTIO_SCSI_MAX_TARGET when connected via virtio-scsi-raw.
>
> It's currently cut against Zhi's qemu vhost-scsi tree here:
>
>    https://github.com/wuzhy/qemu/tree/vhost-scsi
>
> Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
> Cc: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
> ---
>  hw/virtio-scsi.c |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/hw/virtio-scsi.c b/hw/virtio-scsi.c
> index e38cdd0..71276b6 100644
> --- a/hw/virtio-scsi.c
> +++ b/hw/virtio-scsi.c
> @@ -523,7 +523,11 @@ static void virtio_scsi_get_config(VirtIODevice *vdev,
>      stl_raw(&scsiconf->sense_size, s->sense_size);
>      stl_raw(&scsiconf->cdb_size, s->cdb_size);
>      stl_raw(&scsiconf->max_channel, VIRTIO_SCSI_MAX_CHANNEL);
> -    stl_raw(&scsiconf->max_target, VIRTIO_SCSI_MAX_TARGET);
> +    if (s->vhost_scsi) {
> +        stl_raw(&scsiconf->max_target, 0);
> +    } else {
> +        stl_raw(&scsiconf->max_target, VIRTIO_SCSI_MAX_TARGET);
> +    }
>      stl_raw(&scsiconf->max_lun, VIRTIO_SCSI_MAX_LUN);
>  }
>
> --
> 1.7.2.5
>
> --
> You received this message because you are subscribed to the Google Groups "Linux-iSCSI.org Target Development" group.
> To post to this group, send email to linux-iscsi-target-dev@googlegroups.com.
> To unsubscribe from this group, send email to linux-iscsi-target-dev+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/linux-iscsi-target-dev?hl=en.
>



-- 
Regards,

Zhi Yong Wu

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

* Re: [PATCH] hw/virtio-scsi: Set max_target=0 during vhost-scsi operation
  2012-07-11 20:55 ` [Qemu-devel] " Nicholas A. Bellinger
  (?)
@ 2012-07-12  5:34 ` Zhi Yong Wu
  -1 siblings, 0 replies; 20+ messages in thread
From: Zhi Yong Wu @ 2012-07-12  5:34 UTC (permalink / raw)
  To: linux-iscsi-target-dev
  Cc: Stefan Hajnoczi, kvm-devel, Michael S. Tsirkin, qemu-devel,
	Zhi Yong Wu, target-devel, Paolo Bonzini, lf-virt

HI,

Do we need to maintain one QEMU branch to collect all useful latest
patches for tcm_vhost support?  You know, those patches will not get
merged into qemu.git/master.


On Thu, Jul 12, 2012 at 4:55 AM, Nicholas A. Bellinger
<nab@linux-iscsi.org> wrote:
> From: Nicholas Bellinger <nab@linux-iscsi.org>
>
> 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 only attempts to scan target IDs up to
> VIRTIO_SCSI_MAX_TARGET when connected via virtio-scsi-raw.
>
> It's currently cut against Zhi's qemu vhost-scsi tree here:
>
>    https://github.com/wuzhy/qemu/tree/vhost-scsi
>
> Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
> Cc: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
> ---
>  hw/virtio-scsi.c |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/hw/virtio-scsi.c b/hw/virtio-scsi.c
> index e38cdd0..71276b6 100644
> --- a/hw/virtio-scsi.c
> +++ b/hw/virtio-scsi.c
> @@ -523,7 +523,11 @@ static void virtio_scsi_get_config(VirtIODevice *vdev,
>      stl_raw(&scsiconf->sense_size, s->sense_size);
>      stl_raw(&scsiconf->cdb_size, s->cdb_size);
>      stl_raw(&scsiconf->max_channel, VIRTIO_SCSI_MAX_CHANNEL);
> -    stl_raw(&scsiconf->max_target, VIRTIO_SCSI_MAX_TARGET);
> +    if (s->vhost_scsi) {
> +        stl_raw(&scsiconf->max_target, 0);
> +    } else {
> +        stl_raw(&scsiconf->max_target, VIRTIO_SCSI_MAX_TARGET);
> +    }
>      stl_raw(&scsiconf->max_lun, VIRTIO_SCSI_MAX_LUN);
>  }
>
> --
> 1.7.2.5
>
> --
> You received this message because you are subscribed to the Google Groups "Linux-iSCSI.org Target Development" group.
> To post to this group, send email to linux-iscsi-target-dev@googlegroups.com.
> To unsubscribe from this group, send email to linux-iscsi-target-dev+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/linux-iscsi-target-dev?hl=en.
>



-- 
Regards,

Zhi Yong Wu

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

* Re: [PATCH] hw/virtio-scsi: Set max_target=0 during vhost-scsi operation
  2012-07-12  5:34   ` [Qemu-devel] " Zhi Yong Wu
@ 2012-07-12  6:24     ` Paolo Bonzini
  -1 siblings, 0 replies; 20+ messages in thread
From: Paolo Bonzini @ 2012-07-12  6:24 UTC (permalink / raw)
  To: Zhi Yong Wu
  Cc: linux-iscsi-target-dev, qemu-devel, target-devel, lf-virt,
	kvm-devel, Stefan Hajnoczi, Zhi Yong Wu, Michael S. Tsirkin,
	Nicholas Bellinger, Zhi Yong Wu

Il 12/07/2012 07:34, Zhi Yong Wu ha scritto:
> HI,
> 
> Do we need to maintain one QEMU branch to collect all useful latest
> patches for tcm_vhost support?  You know, those patches will not get
> merged into qemu.git/master.

Never say never, but the answer to your question is yes: please apply
this patch to your vhost-scsi branch and push it to github.

Paolo

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

* Re: [Qemu-devel] [PATCH] hw/virtio-scsi: Set max_target=0 during vhost-scsi operation
@ 2012-07-12  6:24     ` Paolo Bonzini
  0 siblings, 0 replies; 20+ messages in thread
From: Paolo Bonzini @ 2012-07-12  6:24 UTC (permalink / raw)
  To: Zhi Yong Wu
  Cc: Stefan Hajnoczi, kvm-devel, Michael S. Tsirkin, Zhi Yong Wu,
	qemu-devel, Nicholas Bellinger, lf-virt, target-devel,
	Zhi Yong Wu, linux-iscsi-target-dev

Il 12/07/2012 07:34, Zhi Yong Wu ha scritto:
> HI,
> 
> Do we need to maintain one QEMU branch to collect all useful latest
> patches for tcm_vhost support?  You know, those patches will not get
> merged into qemu.git/master.

Never say never, but the answer to your question is yes: please apply
this patch to your vhost-scsi branch and push it to github.

Paolo

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

* Re: [PATCH] hw/virtio-scsi: Set max_target=0 during vhost-scsi operation
  2012-07-12  5:34   ` [Qemu-devel] " Zhi Yong Wu
  (?)
@ 2012-07-12  6:24   ` Paolo Bonzini
  -1 siblings, 0 replies; 20+ messages in thread
From: Paolo Bonzini @ 2012-07-12  6:24 UTC (permalink / raw)
  To: Zhi Yong Wu
  Cc: Stefan Hajnoczi, kvm-devel, Michael S. Tsirkin, qemu-devel,
	lf-virt, target-devel, Zhi Yong Wu, linux-iscsi-target-dev

Il 12/07/2012 07:34, Zhi Yong Wu ha scritto:
> HI,
> 
> Do we need to maintain one QEMU branch to collect all useful latest
> patches for tcm_vhost support?  You know, those patches will not get
> merged into qemu.git/master.

Never say never, but the answer to your question is yes: please apply
this patch to your vhost-scsi branch and push it to github.

Paolo

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

* Re: [PATCH] hw/virtio-scsi: Set max_target=0 during vhost-scsi operation
  2012-07-11 20:55 ` [Qemu-devel] " Nicholas A. Bellinger
@ 2012-07-12  6:59   ` Zhi Yong Wu
  -1 siblings, 0 replies; 20+ messages in thread
From: Zhi Yong Wu @ 2012-07-12  6:59 UTC (permalink / raw)
  To: linux-iscsi-target-dev
  Cc: Stefan Hajnoczi, kvm-devel, Michael S. Tsirkin, qemu-devel,
	Zhi Yong Wu, target-devel, Paolo Bonzini, lf-virt

thanks, it is applied to my vhost_scsi git tree
git://github.com/mdroth/qemu.git vhost-scsi


On Thu, Jul 12, 2012 at 4:55 AM, Nicholas A. Bellinger
<nab@linux-iscsi.org> wrote:
> From: Nicholas Bellinger <nab@linux-iscsi.org>
>
> 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 only attempts to scan target IDs up to
> VIRTIO_SCSI_MAX_TARGET when connected via virtio-scsi-raw.
>
> It's currently cut against Zhi's qemu vhost-scsi tree here:
>
>    https://github.com/wuzhy/qemu/tree/vhost-scsi
>
> Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
> Cc: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
> ---
>  hw/virtio-scsi.c |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/hw/virtio-scsi.c b/hw/virtio-scsi.c
> index e38cdd0..71276b6 100644
> --- a/hw/virtio-scsi.c
> +++ b/hw/virtio-scsi.c
> @@ -523,7 +523,11 @@ static void virtio_scsi_get_config(VirtIODevice *vdev,
>      stl_raw(&scsiconf->sense_size, s->sense_size);
>      stl_raw(&scsiconf->cdb_size, s->cdb_size);
>      stl_raw(&scsiconf->max_channel, VIRTIO_SCSI_MAX_CHANNEL);
> -    stl_raw(&scsiconf->max_target, VIRTIO_SCSI_MAX_TARGET);
> +    if (s->vhost_scsi) {
> +        stl_raw(&scsiconf->max_target, 0);
> +    } else {
> +        stl_raw(&scsiconf->max_target, VIRTIO_SCSI_MAX_TARGET);
> +    }
>      stl_raw(&scsiconf->max_lun, VIRTIO_SCSI_MAX_LUN);
>  }
>
> --
> 1.7.2.5
>
> --
> You received this message because you are subscribed to the Google Groups "Linux-iSCSI.org Target Development" group.
> To post to this group, send email to linux-iscsi-target-dev@googlegroups.com.
> To unsubscribe from this group, send email to linux-iscsi-target-dev+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/linux-iscsi-target-dev?hl=en.
>



-- 
Regards,

Zhi Yong Wu

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

* Re: [Qemu-devel] [PATCH] hw/virtio-scsi: Set max_target=0 during vhost-scsi operation
@ 2012-07-12  6:59   ` Zhi Yong Wu
  0 siblings, 0 replies; 20+ messages in thread
From: Zhi Yong Wu @ 2012-07-12  6:59 UTC (permalink / raw)
  To: linux-iscsi-target-dev
  Cc: Stefan Hajnoczi, kvm-devel, Michael S. Tsirkin, Zhi Yong Wu,
	qemu-devel, Nicholas Bellinger, Zhi Yong Wu, target-devel,
	Paolo Bonzini, lf-virt

thanks, it is applied to my vhost_scsi git tree
git://github.com/mdroth/qemu.git vhost-scsi


On Thu, Jul 12, 2012 at 4:55 AM, Nicholas A. Bellinger
<nab@linux-iscsi.org> wrote:
> From: Nicholas Bellinger <nab@linux-iscsi.org>
>
> 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 only attempts to scan target IDs up to
> VIRTIO_SCSI_MAX_TARGET when connected via virtio-scsi-raw.
>
> It's currently cut against Zhi's qemu vhost-scsi tree here:
>
>    https://github.com/wuzhy/qemu/tree/vhost-scsi
>
> Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
> Cc: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
> ---
>  hw/virtio-scsi.c |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/hw/virtio-scsi.c b/hw/virtio-scsi.c
> index e38cdd0..71276b6 100644
> --- a/hw/virtio-scsi.c
> +++ b/hw/virtio-scsi.c
> @@ -523,7 +523,11 @@ static void virtio_scsi_get_config(VirtIODevice *vdev,
>      stl_raw(&scsiconf->sense_size, s->sense_size);
>      stl_raw(&scsiconf->cdb_size, s->cdb_size);
>      stl_raw(&scsiconf->max_channel, VIRTIO_SCSI_MAX_CHANNEL);
> -    stl_raw(&scsiconf->max_target, VIRTIO_SCSI_MAX_TARGET);
> +    if (s->vhost_scsi) {
> +        stl_raw(&scsiconf->max_target, 0);
> +    } else {
> +        stl_raw(&scsiconf->max_target, VIRTIO_SCSI_MAX_TARGET);
> +    }
>      stl_raw(&scsiconf->max_lun, VIRTIO_SCSI_MAX_LUN);
>  }
>
> --
> 1.7.2.5
>
> --
> You received this message because you are subscribed to the Google Groups "Linux-iSCSI.org Target Development" group.
> To post to this group, send email to linux-iscsi-target-dev@googlegroups.com.
> To unsubscribe from this group, send email to linux-iscsi-target-dev+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/linux-iscsi-target-dev?hl=en.
>



-- 
Regards,

Zhi Yong Wu

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

* Re: [PATCH] hw/virtio-scsi: Set max_target=0 during vhost-scsi operation
  2012-07-11 20:55 ` [Qemu-devel] " Nicholas A. Bellinger
@ 2012-07-12  6:59   ` Zhi Yong Wu
  -1 siblings, 0 replies; 20+ messages in thread
From: Zhi Yong Wu @ 2012-07-12  6:59 UTC (permalink / raw)
  To: linux-iscsi-target-dev
  Cc: qemu-devel, target-devel, lf-virt, kvm-devel, Stefan Hajnoczi,
	Zhi Yong Wu, Paolo Bonzini, Michael S. Tsirkin,
	Nicholas Bellinger, Zhi Yong Wu

thanks, it is applied to my vhost_scsi git tree
git://github.com/wuzhy/qemu.git vhost-scsi

On Thu, Jul 12, 2012 at 4:55 AM, Nicholas A. Bellinger
<nab@linux-iscsi.org> wrote:
> From: Nicholas Bellinger <nab@linux-iscsi.org>
>
> 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 only attempts to scan target IDs up to
> VIRTIO_SCSI_MAX_TARGET when connected via virtio-scsi-raw.
>
> It's currently cut against Zhi's qemu vhost-scsi tree here:
>
>    https://github.com/wuzhy/qemu/tree/vhost-scsi
>
> Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
> Cc: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
> ---
>  hw/virtio-scsi.c |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/hw/virtio-scsi.c b/hw/virtio-scsi.c
> index e38cdd0..71276b6 100644
> --- a/hw/virtio-scsi.c
> +++ b/hw/virtio-scsi.c
> @@ -523,7 +523,11 @@ static void virtio_scsi_get_config(VirtIODevice *vdev,
>      stl_raw(&scsiconf->sense_size, s->sense_size);
>      stl_raw(&scsiconf->cdb_size, s->cdb_size);
>      stl_raw(&scsiconf->max_channel, VIRTIO_SCSI_MAX_CHANNEL);
> -    stl_raw(&scsiconf->max_target, VIRTIO_SCSI_MAX_TARGET);
> +    if (s->vhost_scsi) {
> +        stl_raw(&scsiconf->max_target, 0);
> +    } else {
> +        stl_raw(&scsiconf->max_target, VIRTIO_SCSI_MAX_TARGET);
> +    }
>      stl_raw(&scsiconf->max_lun, VIRTIO_SCSI_MAX_LUN);
>  }
>
> --
> 1.7.2.5
>
> --
> You received this message because you are subscribed to the Google Groups "Linux-iSCSI.org Target Development" group.
> To post to this group, send email to linux-iscsi-target-dev@googlegroups.com.
> To unsubscribe from this group, send email to linux-iscsi-target-dev+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/linux-iscsi-target-dev?hl=en.
>



-- 
Regards,

Zhi Yong Wu

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

* Re: [Qemu-devel] [PATCH] hw/virtio-scsi: Set max_target=0 during vhost-scsi operation
@ 2012-07-12  6:59   ` Zhi Yong Wu
  0 siblings, 0 replies; 20+ messages in thread
From: Zhi Yong Wu @ 2012-07-12  6:59 UTC (permalink / raw)
  To: linux-iscsi-target-dev
  Cc: Stefan Hajnoczi, kvm-devel, Michael S. Tsirkin, Zhi Yong Wu,
	qemu-devel, Nicholas Bellinger, Zhi Yong Wu, target-devel,
	Paolo Bonzini, lf-virt

thanks, it is applied to my vhost_scsi git tree
git://github.com/wuzhy/qemu.git vhost-scsi

On Thu, Jul 12, 2012 at 4:55 AM, Nicholas A. Bellinger
<nab@linux-iscsi.org> wrote:
> From: Nicholas Bellinger <nab@linux-iscsi.org>
>
> 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 only attempts to scan target IDs up to
> VIRTIO_SCSI_MAX_TARGET when connected via virtio-scsi-raw.
>
> It's currently cut against Zhi's qemu vhost-scsi tree here:
>
>    https://github.com/wuzhy/qemu/tree/vhost-scsi
>
> Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
> Cc: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
> ---
>  hw/virtio-scsi.c |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/hw/virtio-scsi.c b/hw/virtio-scsi.c
> index e38cdd0..71276b6 100644
> --- a/hw/virtio-scsi.c
> +++ b/hw/virtio-scsi.c
> @@ -523,7 +523,11 @@ static void virtio_scsi_get_config(VirtIODevice *vdev,
>      stl_raw(&scsiconf->sense_size, s->sense_size);
>      stl_raw(&scsiconf->cdb_size, s->cdb_size);
>      stl_raw(&scsiconf->max_channel, VIRTIO_SCSI_MAX_CHANNEL);
> -    stl_raw(&scsiconf->max_target, VIRTIO_SCSI_MAX_TARGET);
> +    if (s->vhost_scsi) {
> +        stl_raw(&scsiconf->max_target, 0);
> +    } else {
> +        stl_raw(&scsiconf->max_target, VIRTIO_SCSI_MAX_TARGET);
> +    }
>      stl_raw(&scsiconf->max_lun, VIRTIO_SCSI_MAX_LUN);
>  }
>
> --
> 1.7.2.5
>
> --
> You received this message because you are subscribed to the Google Groups "Linux-iSCSI.org Target Development" group.
> To post to this group, send email to linux-iscsi-target-dev@googlegroups.com.
> To unsubscribe from this group, send email to linux-iscsi-target-dev+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/linux-iscsi-target-dev?hl=en.
>



-- 
Regards,

Zhi Yong Wu

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

* Re: [PATCH] hw/virtio-scsi: Set max_target=0 during vhost-scsi operation
  2012-07-11 20:55 ` [Qemu-devel] " Nicholas A. Bellinger
                   ` (4 preceding siblings ...)
  (?)
@ 2012-07-12  6:59 ` Zhi Yong Wu
  -1 siblings, 0 replies; 20+ messages in thread
From: Zhi Yong Wu @ 2012-07-12  6:59 UTC (permalink / raw)
  To: linux-iscsi-target-dev
  Cc: Stefan Hajnoczi, kvm-devel, Michael S. Tsirkin, qemu-devel,
	Zhi Yong Wu, target-devel, Paolo Bonzini, lf-virt

thanks, it is applied to my vhost_scsi git tree
git://github.com/wuzhy/qemu.git vhost-scsi

On Thu, Jul 12, 2012 at 4:55 AM, Nicholas A. Bellinger
<nab@linux-iscsi.org> wrote:
> From: Nicholas Bellinger <nab@linux-iscsi.org>
>
> 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 only attempts to scan target IDs up to
> VIRTIO_SCSI_MAX_TARGET when connected via virtio-scsi-raw.
>
> It's currently cut against Zhi's qemu vhost-scsi tree here:
>
>    https://github.com/wuzhy/qemu/tree/vhost-scsi
>
> Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
> Cc: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
> ---
>  hw/virtio-scsi.c |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/hw/virtio-scsi.c b/hw/virtio-scsi.c
> index e38cdd0..71276b6 100644
> --- a/hw/virtio-scsi.c
> +++ b/hw/virtio-scsi.c
> @@ -523,7 +523,11 @@ static void virtio_scsi_get_config(VirtIODevice *vdev,
>      stl_raw(&scsiconf->sense_size, s->sense_size);
>      stl_raw(&scsiconf->cdb_size, s->cdb_size);
>      stl_raw(&scsiconf->max_channel, VIRTIO_SCSI_MAX_CHANNEL);
> -    stl_raw(&scsiconf->max_target, VIRTIO_SCSI_MAX_TARGET);
> +    if (s->vhost_scsi) {
> +        stl_raw(&scsiconf->max_target, 0);
> +    } else {
> +        stl_raw(&scsiconf->max_target, VIRTIO_SCSI_MAX_TARGET);
> +    }
>      stl_raw(&scsiconf->max_lun, VIRTIO_SCSI_MAX_LUN);
>  }
>
> --
> 1.7.2.5
>
> --
> You received this message because you are subscribed to the Google Groups "Linux-iSCSI.org Target Development" group.
> To post to this group, send email to linux-iscsi-target-dev@googlegroups.com.
> To unsubscribe from this group, send email to linux-iscsi-target-dev+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/linux-iscsi-target-dev?hl=en.
>



-- 
Regards,

Zhi Yong Wu

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

* Re: [PATCH] hw/virtio-scsi: Set max_target=0 during vhost-scsi operation
  2012-07-12  6:59   ` [Qemu-devel] " Zhi Yong Wu
@ 2012-07-12 22:08     ` Nicholas A. Bellinger
  -1 siblings, 0 replies; 20+ messages in thread
From: Nicholas A. Bellinger @ 2012-07-12 22:08 UTC (permalink / raw)
  To: Zhi Yong Wu
  Cc: linux-iscsi-target-dev, qemu-devel, target-devel, lf-virt,
	kvm-devel, Stefan Hajnoczi, Zhi Yong Wu, Paolo Bonzini,
	Michael S. Tsirkin, Zhi Yong Wu

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 megasas 8708EM2 HBA emulation from Dr. Hannes so we can
experiment with a few more types of target setups.  ;)

I'll likely do this on my local branch for now, but if you have the
extra cycles please feel free to update vhost-scsi to the latest
qemu.git HEAD so we can have both vhost-scsi + megasas HBA emulation in
the same working tree.

Depending upon how long we'll need to hold vhost-scsi patches
out-of-tree (hopefully it's less than infinity ;) a qemu/vhost-scsi
working tree on kernel.org might also be helpful.

Thanks!

--nab




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

* Re: [Qemu-devel] [PATCH] hw/virtio-scsi: Set max_target=0 during vhost-scsi operation
@ 2012-07-12 22:08     ` Nicholas A. Bellinger
  0 siblings, 0 replies; 20+ messages in thread
From: Nicholas A. Bellinger @ 2012-07-12 22:08 UTC (permalink / raw)
  To: Zhi Yong Wu
  Cc: Stefan Hajnoczi, kvm-devel, Michael S. Tsirkin, Zhi Yong Wu,
	qemu-devel, lf-virt, target-devel, Paolo Bonzini, Zhi Yong Wu,
	linux-iscsi-target-dev

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 megasas 8708EM2 HBA emulation from Dr. Hannes so we can
experiment with a few more types of target setups.  ;)

I'll likely do this on my local branch for now, but if you have the
extra cycles please feel free to update vhost-scsi to the latest
qemu.git HEAD so we can have both vhost-scsi + megasas HBA emulation in
the same working tree.

Depending upon how long we'll need to hold vhost-scsi patches
out-of-tree (hopefully it's less than infinity ;) a qemu/vhost-scsi
working tree on kernel.org might also be helpful.

Thanks!

--nab

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

* Re: [PATCH] hw/virtio-scsi: Set max_target=0 during vhost-scsi operation
  2012-07-12  6:59   ` [Qemu-devel] " Zhi Yong Wu
  (?)
@ 2012-07-12 22:08   ` Nicholas A. Bellinger
  -1 siblings, 0 replies; 20+ messages in thread
From: Nicholas A. Bellinger @ 2012-07-12 22:08 UTC (permalink / raw)
  To: Zhi Yong Wu
  Cc: Stefan Hajnoczi, kvm-devel, Michael S. Tsirkin, qemu-devel,
	lf-virt, target-devel, Paolo Bonzini, Zhi Yong Wu,
	linux-iscsi-target-dev

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 megasas 8708EM2 HBA emulation from Dr. Hannes so we can
experiment with a few more types of target setups.  ;)

I'll likely do this on my local branch for now, but if you have the
extra cycles please feel free to update vhost-scsi to the latest
qemu.git HEAD so we can have both vhost-scsi + megasas HBA emulation in
the same working tree.

Depending upon how long we'll need to hold vhost-scsi patches
out-of-tree (hopefully it's less than infinity ;) a qemu/vhost-scsi
working tree on kernel.org might also be helpful.

Thanks!

--nab

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

* Re: [PATCH] hw/virtio-scsi: Set max_target=0 during vhost-scsi operation
  2012-07-12 22:08     ` [Qemu-devel] " Nicholas A. Bellinger
@ 2012-07-16  1:55       ` Zhi Yong Wu
  -1 siblings, 0 replies; 20+ messages in thread
From: Zhi Yong Wu @ 2012-07-16  1:55 UTC (permalink / raw)
  To: Nicholas A. Bellinger
  Cc: linux-iscsi-target-dev, qemu-devel, target-devel, lf-virt,
	kvm-devel, Stefan Hajnoczi, Zhi Yong Wu, Paolo Bonzini,
	Michael S. Tsirkin, Zhi Yong Wu

HI, nab,

On Fri, Jul 13, 2012 at 6:08 AM, Nicholas A. Bellinger
<nab@linux-iscsi.org> wrote:
> 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 megasas 8708EM2 HBA emulation from Dr. Hannes so we can
> experiment with a few more types of target setups.  ;)
I have rebased my vhost-scsi tree to latest qemu.git.
>
> I'll likely do this on my local branch for now, but if you have the
> extra cycles please feel free to update vhost-scsi to the latest
> qemu.git HEAD so we can have both vhost-scsi + megasas HBA emulation in
> the same working tree.
I have push rebased vhost-scsi tree to my public git.
>
> Depending upon how long we'll need to hold vhost-scsi patches
> out-of-tree (hopefully it's less than infinity ;) a qemu/vhost-scsi
Heh, i also hope so, but have not anthority to push it to kernel.org.

> working tree on kernel.org might also be helpful.
>
> Thanks!
>
> --nab
>
>
>



-- 
Regards,

Zhi Yong Wu

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

* Re: [Qemu-devel] [PATCH] hw/virtio-scsi: Set max_target=0 during vhost-scsi operation
@ 2012-07-16  1:55       ` Zhi Yong Wu
  0 siblings, 0 replies; 20+ messages in thread
From: Zhi Yong Wu @ 2012-07-16  1:55 UTC (permalink / raw)
  To: Nicholas A. Bellinger
  Cc: Stefan Hajnoczi, kvm-devel, Michael S. Tsirkin, Zhi Yong Wu,
	qemu-devel, lf-virt, target-devel, Paolo Bonzini, Zhi Yong Wu,
	linux-iscsi-target-dev

HI, nab,

On Fri, Jul 13, 2012 at 6:08 AM, Nicholas A. Bellinger
<nab@linux-iscsi.org> wrote:
> 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 megasas 8708EM2 HBA emulation from Dr. Hannes so we can
> experiment with a few more types of target setups.  ;)
I have rebased my vhost-scsi tree to latest qemu.git.
>
> I'll likely do this on my local branch for now, but if you have the
> extra cycles please feel free to update vhost-scsi to the latest
> qemu.git HEAD so we can have both vhost-scsi + megasas HBA emulation in
> the same working tree.
I have push rebased vhost-scsi tree to my public git.
>
> Depending upon how long we'll need to hold vhost-scsi patches
> out-of-tree (hopefully it's less than infinity ;) a qemu/vhost-scsi
Heh, i also hope so, but have not anthority to push it to kernel.org.

> working tree on kernel.org might also be helpful.
>
> Thanks!
>
> --nab
>
>
>



-- 
Regards,

Zhi Yong Wu

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

* Re: [PATCH] hw/virtio-scsi: Set max_target=0 during vhost-scsi operation
  2012-07-12 22:08     ` [Qemu-devel] " Nicholas A. Bellinger
  (?)
@ 2012-07-16  1:55     ` Zhi Yong Wu
  -1 siblings, 0 replies; 20+ messages in thread
From: Zhi Yong Wu @ 2012-07-16  1:55 UTC (permalink / raw)
  To: Nicholas A. Bellinger
  Cc: Stefan Hajnoczi, kvm-devel, Michael S. Tsirkin, qemu-devel,
	lf-virt, target-devel, Paolo Bonzini, Zhi Yong Wu,
	linux-iscsi-target-dev

HI, nab,

On Fri, Jul 13, 2012 at 6:08 AM, Nicholas A. Bellinger
<nab@linux-iscsi.org> wrote:
> 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 megasas 8708EM2 HBA emulation from Dr. Hannes so we can
> experiment with a few more types of target setups.  ;)
I have rebased my vhost-scsi tree to latest qemu.git.
>
> I'll likely do this on my local branch for now, but if you have the
> extra cycles please feel free to update vhost-scsi to the latest
> qemu.git HEAD so we can have both vhost-scsi + megasas HBA emulation in
> the same working tree.
I have push rebased vhost-scsi tree to my public git.
>
> Depending upon how long we'll need to hold vhost-scsi patches
> out-of-tree (hopefully it's less than infinity ;) a qemu/vhost-scsi
Heh, i also hope so, but have not anthority to push it to kernel.org.

> working tree on kernel.org might also be helpful.
>
> Thanks!
>
> --nab
>
>
>



-- 
Regards,

Zhi Yong Wu

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

* [PATCH] hw/virtio-scsi: Set max_target=0 during vhost-scsi operation
@ 2012-07-11 20:55 Nicholas A. Bellinger
  0 siblings, 0 replies; 20+ messages in thread
From: Nicholas A. Bellinger @ 2012-07-11 20:55 UTC (permalink / raw)
  To: qemu-devel
  Cc: Stefan Hajnoczi, kvm-devel, Michael S. Tsirkin, Zhi Yong Wu,
	target-devel, Paolo Bonzini, lf-virt

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

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 only attempts to scan target IDs up to
VIRTIO_SCSI_MAX_TARGET when connected via virtio-scsi-raw.

It's currently cut against Zhi's qemu vhost-scsi tree here:

   https://github.com/wuzhy/qemu/tree/vhost-scsi

Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Cc: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
---
 hw/virtio-scsi.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/hw/virtio-scsi.c b/hw/virtio-scsi.c
index e38cdd0..71276b6 100644
--- a/hw/virtio-scsi.c
+++ b/hw/virtio-scsi.c
@@ -523,7 +523,11 @@ static void virtio_scsi_get_config(VirtIODevice *vdev,
     stl_raw(&scsiconf->sense_size, s->sense_size);
     stl_raw(&scsiconf->cdb_size, s->cdb_size);
     stl_raw(&scsiconf->max_channel, VIRTIO_SCSI_MAX_CHANNEL);
-    stl_raw(&scsiconf->max_target, VIRTIO_SCSI_MAX_TARGET);
+    if (s->vhost_scsi) {
+        stl_raw(&scsiconf->max_target, 0);
+    } else {
+        stl_raw(&scsiconf->max_target, VIRTIO_SCSI_MAX_TARGET);
+    }
     stl_raw(&scsiconf->max_lun, VIRTIO_SCSI_MAX_LUN);
 }
 
-- 
1.7.2.5

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

end of thread, other threads:[~2012-07-16  1:55 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-11 20:55 [PATCH] hw/virtio-scsi: Set max_target=0 during vhost-scsi operation Nicholas A. Bellinger
2012-07-11 20:55 ` [Qemu-devel] " Nicholas A. Bellinger
2012-07-12  5:34 ` Zhi Yong Wu
2012-07-12  5:34 ` Zhi Yong Wu
2012-07-12  5:34   ` [Qemu-devel] " Zhi Yong Wu
2012-07-12  6:24   ` Paolo Bonzini
2012-07-12  6:24   ` Paolo Bonzini
2012-07-12  6:24     ` [Qemu-devel] " Paolo Bonzini
2012-07-12  6:59 ` Zhi Yong Wu
2012-07-12  6:59   ` [Qemu-devel] " Zhi Yong Wu
2012-07-12  6:59 ` Zhi Yong Wu
2012-07-12  6:59   ` [Qemu-devel] " Zhi Yong Wu
2012-07-12 22:08   ` Nicholas A. Bellinger
2012-07-12 22:08   ` Nicholas A. Bellinger
2012-07-12 22:08     ` [Qemu-devel] " Nicholas A. Bellinger
2012-07-16  1:55     ` Zhi Yong Wu
2012-07-16  1:55     ` Zhi Yong Wu
2012-07-16  1:55       ` [Qemu-devel] " Zhi Yong Wu
2012-07-12  6:59 ` Zhi Yong Wu
  -- strict thread matches above, loose matches on Subject: below --
2012-07-11 20:55 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.