From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57996) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UpVTY-0004QD-An for qemu-devel@nongnu.org; Wed, 19 Jun 2013 23:23:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UpVTX-0004uJ-4I for qemu-devel@nongnu.org; Wed, 19 Jun 2013 23:23:56 -0400 Received: from e23smtp03.au.ibm.com ([202.81.31.145]:39184) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UpVTW-0004tx-HY for qemu-devel@nongnu.org; Wed, 19 Jun 2013 23:23:55 -0400 Received: from /spool/local by e23smtp03.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 20 Jun 2013 13:14:24 +1000 Received: from d23relay04.au.ibm.com (d23relay04.au.ibm.com [9.190.234.120]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id 6978B2CE8051 for ; Thu, 20 Jun 2013 13:23:39 +1000 (EST) Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r5K38tQg50069584 for ; Thu, 20 Jun 2013 13:08:56 +1000 Received: from d23av03.au.ibm.com (loopback [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r5K3Nc7e001811 for ; Thu, 20 Jun 2013 13:23:38 +1000 Message-ID: <51C27563.2010907@linux.vnet.ibm.com> Date: Thu, 20 Jun 2013 11:22:11 +0800 From: Wenchao Xia MIME-Version: 1.0 References: <1366381460-6041-1-git-send-email-pbonzini@redhat.com> <1366381460-6041-7-git-send-email-pbonzini@redhat.com> <51A4590F.90503@linux.vnet.ibm.com> <51A4644A.6070002@redhat.com> <5D9ACBBCF6B270468D615C4719A59BE359CD333B@szxeml548-mbx.china.huawei.com> <20130620013348.GA9802@hj.localdomain> In-Reply-To: <20130620013348.GA9802@hj.localdomain> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH 6/9] vhost-scsi: new device supporting the tcm_vhost Linux kernel module List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Asias He Cc: Libaiqing , "Michael S. Tsirkin" , "qemu-devel@nongnu.org" , "nab@linux-iscsi.org" , Haofeng , Paolo Bonzini 于 2013-6-20 9:33, Asias He 写道: > On Wed, Jun 19, 2013 at 12:55:10PM +0000, Libaiqing wrote: >> Hi paolo, >> The vhost-scsi device can be used as boot device? >> I tested with your config + 3.10 rc6 + seabios 1.7.2.2,but failed. >> Could you give me some advise to debug this problem ? I can provide more information if need. > > Boot from vhost-scsi is supposed to work. The seabios you used should be > fine which contains the fixes for vhost-scsi. > > Instead of playing with the /sys/kernel/config/target directly, I really > recommend using targetcli utils. > > Nab, I think we really should write some docs for people to use > vhost-scsi. A section in qemu-options.hx would be great, currently an example is good enough to me. > > This is how I install and use targetcli in RHEL6. Note you need upstream > kernel and qemu bits for vhost-scsi. > > # yum groupinstall 'Development tools' > # yum install python-devel epydoc python-simpleparse > > # git clone git://github.com/agrover/rtslib-fb.git > # git clone git://github.com/agrover/targetcli-fb.git > # git clone git://github.com/agrover/configshell-fb.git > # for i in rtslib-fb configshell-fb targetcli-fb; do > make -C $i rpm > yum localinstall $i/dist/*.noarch.rpm > done > > In targetcli, create a backstore and vhost wwpn, e.g. > # targetcli > /> /backstores/ramdisk create r0 1g > /> /vhost create > /> cd /vhost/naa.500140527cb6616b/tpg1/luns > /> create /backstores/ramdisk/r0 > > # qemu -device vhost-scsi-pci,wwpn=naa.500140527cb6616b ... > > Hope this helps. > >> Regards, >> baiqing >> >>> -----Original Message----- >>> From: qemu-devel-bounces+libaiqing=huawei.com@nongnu.org >>> [mailto:qemu-devel-bounces+libaiqing=huawei.com@nongnu.org] On >>> Behalf Of Paolo Bonzini >>> Sent: Tuesday, May 28, 2013 4:01 PM >>> To: Wenchao Xia >>> Cc: asias@redhat.com; qemu-devel@nongnu.org; nab@linux-iscsi.org; >>> Michael S. Tsirkin >>> Subject: Re: [Qemu-devel] [PATCH 6/9] vhost-scsi: new device supporting the >>> tcm_vhost Linux kernel module >>> >>> Il 28/05/2013 09:13, Wenchao Xia ha scritto: >>>>>> From: Nicholas Bellinger >>>>>> >>>>>> The WWPN specified in configfs is passed to "-device vhost-scsi-pci". >>>>>> The tgpt field of the SET_ENDPOINT ioctl is obsolete now, so it is not >>>>>> available from the QEMU command-line. Instead, I hardcode it to >>> zero. >>>>>> >>>> Hi, Paolo >>>> Any document about how to config it correctly in configfs, before >>>> invoking qemu with the WWPN number? >>> >>> Unfortunately no, but vhost-scsi doesn't have many knobs (unlike >>> iSCSI for example) so it's quite simple. Here is an example: >>> >>> cd /sys/kernel/config/target >>> mkdir -p core/fileio_0/fileio >>> echo 'fd_dev_name=/home/pbonzini/test.img,fd_dev_size=5905580032' > >>> core/fileio_0/fileio/control >>> echo 1 > core/fileio_0/fileio/enable >>> mkdir -p vhost/naa.600140554cf3a18e/tpgt_0/lun/lun_0 >>> cd vhost/naa.600140554cf3a18e/tpgt_0 >>> ln -sf ../../../../../core/fileio_0/fileio/ lun/lun_0/virtual_scsi_port >>> echo naa.60014053226f0388 > nexus >>> >>> The "nexus" value is the initiator WWN. naa.600140554cf3a18e is the >>> target WWN that you have to pass to "-device vhost-scsi-pci". >>> >>> Paolo >> > -- Best Regards Wenchao Xia