Asias He | 17 Aug 2012 11:26
Picon

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

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
(Continue reading)

Pekka Enberg | 17 Aug 2012 12:04
Gravatar

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

On Fri, Aug 17, 2012 at 12:26 PM, Asias He <asias.hejun <at> gmail.com> 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
(Continue reading)

Pekka Enberg | 20 Aug 2012 08:22
Gravatar

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

On Fri, Aug 17, 2012 at 1:04 PM, Pekka Enberg <penberg <at> kernel.org> wrote:
> Looks good to me. I'll sit on this for a little while if the
> virtio-scsi folks want to comment on the code.

Applied, thanks Asias!
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Nicholas A. Bellinger | 22 Aug 2012 05:48

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

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

Excited to see vhost-scsi support within kvm-tool btw.  :)

Just one comment below wrt syncing up with v3.6-rc3 code..

> diff --git a/tools/kvm/include/kvm/virtio-scsi.h b/tools/kvm/include/kvm/virtio-scsi.h
> new file mode 100644
> index 0000000..a780d7e
> --- /dev/null
> +++ b/tools/kvm/include/kvm/virtio-scsi.h
>  <at>  <at>  -0,0 +1,26  <at>  <at> 
> +#ifndef KVM__SCSI_VIRTIO_H
> +#define KVM__SCSI_VIRTIO_H
> +
> +#include "kvm/disk-image.h"
> +
> +struct kvm;
> +
> +int virtio_scsi_init(struct kvm *kvm);
> +int virtio_scsi_exit(struct kvm *kvm);
> +
(Continue reading)

Asias He | 22 Aug 2012 07:44
Picon

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

On Wed, Aug 22, 2012 at 11:48 AM, Nicholas A. Bellinger
<nab <at> linux-iscsi.org> wrote:
> On Fri, 2012-08-17 at 17:26 +0800, Asias He wrote:
>> This patch brings virito-scsi support to kvm tool.
>>
>> With the introduce of tcm_vhost (vhost-scsi)
>>
>>    tcm_vhost: Initial merge for vhost level target fabric driver
>>
>> we can implement virito-scsi by simply having vhost-scsi to handle the
>> SCSI command.
>
> Excited to see vhost-scsi support within kvm-tool btw.  :)
>
> Just one comment below wrt syncing up with v3.6-rc3 code..
>
>> diff --git a/tools/kvm/include/kvm/virtio-scsi.h b/tools/kvm/include/kvm/virtio-scsi.h
>> new file mode 100644
>> index 0000000..a780d7e
>> --- /dev/null
>> +++ b/tools/kvm/include/kvm/virtio-scsi.h
>>  <at>  <at>  -0,0 +1,26  <at>  <at> 
>> +#ifndef KVM__SCSI_VIRTIO_H
>> +#define KVM__SCSI_VIRTIO_H
>> +
>> +#include "kvm/disk-image.h"
>> +
>> +struct kvm;
>> +
>> +int virtio_scsi_init(struct kvm *kvm);
(Continue reading)


Gmane