hw/virtio-scsi: Set max_target=0 during vhost-scsi operation
Subsystems (2)
PATCH 1/1 hw/virtio-scsi: Set max_target=0 during vhost-scsi operation
From: Nicholas Bellinger <[email protected]>
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
--- hw/virtio-scsi.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
hw/virtio-scsi.c +5 -1
@@ -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 ); }
Signature · 1 line
1.7.2.5
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.
Quoted 48 lines · Nicholas A. Bellinger
From: Nicholas Bellinger <[email protected]>
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_vhostendpoints as requested by Paolo.This ensures that virtio-scsi LLD only attempts to scan target IDs up to
VIRTIO_SCSI_MAX_TARGETwhen 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 <[email protected]>Cc Zhi Yong Wu <[email protected]>Cc Paolo Bonzini <[email protected]>Signed-off-by Nicholas Bellinger <[email protected]>--- hw/virtio-scsi.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)hw/virtio-scsi.c +5
-2@@ -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 [email protected].
To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/linux-iscsi-target-dev?hl=en.
Signature · 3 lines
Regards, 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.
Quoted 48 lines · Nicholas A. Bellinger
From: Nicholas Bellinger <[email protected]>
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_vhostendpoints as requested by Paolo.This ensures that virtio-scsi LLD only attempts to scan target IDs up to
VIRTIO_SCSI_MAX_TARGETwhen 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 <[email protected]>Cc Zhi Yong Wu <[email protected]>Cc Paolo Bonzini <[email protected]>Signed-off-by Nicholas Bellinger <[email protected]>--- hw/virtio-scsi.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)hw/virtio-scsi.c +5
-2@@ -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 [email protected].
To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/linux-iscsi-target-dev?hl=en.
Signature · 3 lines
Regards, Zhi Yong Wu
Paolo Bonzini
maintainerIl 12/07/2012 07:34, Zhi Yong Wu ha scritto:
Quoted 5 lines
HI,
Do we need to maintain one QEMU branch to collect all useful latest patches for
tcm_vhostsupport? 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
Paolo Bonzini
maintainerIl 12/07/2012 07:34, Zhi Yong Wu ha scritto:
Quoted 5 lines
HI,
Do we need to maintain one QEMU branch to collect all useful latest patches for
tcm_vhostsupport? 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
thanks, it is applied to my vhost_scsi git treegit://github.com/mdroth/qemu.git vhost-scsi
Quoted 48 lines · Nicholas A. Bellinger
From: Nicholas Bellinger <[email protected]>
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_vhostendpoints as requested by Paolo.This ensures that virtio-scsi LLD only attempts to scan target IDs up to
VIRTIO_SCSI_MAX_TARGETwhen 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 <[email protected]>Cc Zhi Yong Wu <[email protected]>Cc Paolo Bonzini <[email protected]>Signed-off-by Nicholas Bellinger <[email protected]>--- hw/virtio-scsi.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)hw/virtio-scsi.c +5
-2@@ -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 [email protected].
To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/linux-iscsi-target-dev?hl=en.
Signature · 3 lines
Regards, Zhi Yong Wu
thanks, it is applied to my vhost_scsi git treegit://github.com/wuzhy/qemu.git vhost-scsi
Quoted 48 lines · Nicholas A. Bellinger
From: Nicholas Bellinger <[email protected]>
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_vhostendpoints as requested by Paolo.This ensures that virtio-scsi LLD only attempts to scan target IDs up to
VIRTIO_SCSI_MAX_TARGETwhen 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 <[email protected]>Cc Zhi Yong Wu <[email protected]>Cc Paolo Bonzini <[email protected]>Signed-off-by Nicholas Bellinger <[email protected]>--- hw/virtio-scsi.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)hw/virtio-scsi.c +5
-2@@ -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 [email protected].
To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/linux-iscsi-target-dev?hl=en.
Signature · 3 lines
Regards, Zhi Yong Wu
thanks, it is applied to my vhost_scsi git treegit://github.com/wuzhy/qemu.git vhost-scsi
Quoted 48 lines · Nicholas A. Bellinger
From: Nicholas Bellinger <[email protected]>
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_vhostendpoints as requested by Paolo.This ensures that virtio-scsi LLD only attempts to scan target IDs up to
VIRTIO_SCSI_MAX_TARGETwhen 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 <[email protected]>Cc Zhi Yong Wu <[email protected]>Cc Paolo Bonzini <[email protected]>Signed-off-by Nicholas Bellinger <[email protected]>--- hw/virtio-scsi.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)hw/virtio-scsi.c +5
-2@@ -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 [email protected].
To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/linux-iscsi-target-dev?hl=en.
Signature · 3 lines
Regards, Zhi Yong Wu
Hi Zhi,
Quoted 3 lines · Zhi Yong Wu
thanks, it is applied to my
vhost_scsigit treegit://github.com/wuzhy/qemu.gitvhost-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
Hi Zhi,
Quoted 3 lines · Zhi Yong Wu
thanks, it is applied to my
vhost_scsigit treegit://github.com/wuzhy/qemu.gitvhost-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
HI, nab,
Quoted 7 lines · Nicholas A. Bellinger
Hi Zhi,
Quoted 3 lines · Zhi Yong Wu
thanks, it is applied to my
vhost_scsigit treegit://github.com/wuzhy/qemu.gitvhost-scsi
Quoted 5 lines
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.
Quoted 5 lines
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.
Quoted 3 lines
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.
Quoted 8 lines
working tree on kernel.org might also be helpful.
Thanks!
--nab
Signature · 3 lines
Regards, Zhi Yong Wu
HI, nab,
Quoted 7 lines · Nicholas A. Bellinger
Hi Zhi,
Quoted 3 lines · Zhi Yong Wu
thanks, it is applied to my
vhost_scsigit treegit://github.com/wuzhy/qemu.gitvhost-scsi
Quoted 5 lines
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.
Quoted 5 lines
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.
Quoted 3 lines
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.
Quoted 8 lines
working tree on kernel.org might also be helpful.
Thanks!
--nab
Signature · 3 lines
Regards, Zhi Yong Wu