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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 14, 2012 at 09:52:55AM +0800, Asias He wrote:
> On Mon, Aug 13, 2012 at 3:24 PM, Pekka Enberg <penberg@xxxxxxxxxx> wrote:
> > On Thu, Aug 9, 2012 at 3:51 AM, Asias He <asias.hejun@xxxxxxxxx> wrote:
> >> This patch brings virito-scsi support to kvm tool.
> >>
> >> With the introduce of tcm_vhost (vhost-scsi)
> >>
> >>    tcm_vhost: Initial merge for vhost level target fabric driver
> >>
> >> we can implement virito-scsi by simply having vhost-scsi to handle the
> >> SCSI command.
> >>
> >> Howto use:
> >> 1) Setup the tcm_vhost target through /sys/kernel/config
> >>
> >>    [Stefan Hajnoczi, Thanks for the script to setup tcm_vhost]
> >>
> >>    ** Setup wwpn and tpgt
> >>    $ wwpn="naa.0"
> >>    $ tpgt=/sys/kernel/config/target/vhost/$wwpn/tpgt_0
> >>    $ nexus=$tpgt/nexus
> >>    $ mkdir -p $tpgt
> >>    $ echo -n $wwpn > $nexus
> >>
> >>    ** Setup lun using /dev/ram
> >>    $ n=0
> >>    $ lun=$tpgt/lun/lun_${n}
> >>    $ data=/sys/kernel/config/target/core/iblock_0/data_${n}
> >>    $ ram=/dev/ram${n}
> >>    $ mkdir -p $lun
> >>    $ mkdir -p $data
> >>    $ echo -n udev_path=${ram} > $data/control
> >>    $ echo -n 1 > $data/enable
> >>    $ ln -s $data $lun
> >>
> >> 2) Run kvm tool with the new disk option '-d scsi:$wwpn:$tpgt', e.g
> >>    $ lkvm run -k /boot/bzImage -d ~/img/sid.img -d scsi:naa.0:0
> >>
> >> Signed-off-by: Asias He <asias.hejun@xxxxxxxxx>
> >> Cc: Nicholas A. Bellinger <nab@xxxxxxxxxxxxxxx>
> >> Cc: Stefan Hajnoczi <stefanha@xxxxxxxxxxxxxxxxxx>
> >> Cc: Paolo Bonzini <pbonzini@xxxxxxxxxx>
> >
> > I've included some comments below but overall, looks good to me. Sasha?
> >
> >> ---
> >> diff --git a/tools/kvm/include/kvm/disk-image.h b/tools/kvm/include/kvm/disk-image.h
> >> index 7ae17f8..54e4047 100644
> >> --- a/tools/kvm/include/kvm/disk-image.h
> >> +++ b/tools/kvm/include/kvm/disk-image.h
> >> @@ -41,6 +41,8 @@ struct disk_image_operations {
> >>
> >>  struct disk_image_params {
> >>         const char *filename;
> >> +       const char *wwpn;
> >> +       const char *tpgt;
> >
> > Maybe it's just me but "wwpn" and "tpgt" really could use a comment
> > explaining what they are...
> 
> OK. They are terminology from linux target.
> 
>    wwpn == world wide port number
>    tpgt == target port group tag

Target Portal Group Tag

TPGT is iSCSI-specific terminology but other transports like SAS or FCP
have similar concepts of naming target ports.  I think this terminology
is used by the LIO target regardless of the fabric.

The SCSI Architecture Model standard says the target port name is the
"name (see 3.1.70) of a SCSI target port that is world wide unique
within the SCSI transport protocol of the SCSI domain of that SCSI
target port".

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux