From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34744) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uhi21-0002x3-4c for qemu-devel@nongnu.org; Wed, 29 May 2013 11:11:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uhi1u-0001jC-R9 for qemu-devel@nongnu.org; Wed, 29 May 2013 11:11:17 -0400 Received: from e7.ny.us.ibm.com ([32.97.182.137]:46244) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uhi1u-0001bx-OA for qemu-devel@nongnu.org; Wed, 29 May 2013 11:11:10 -0400 Received: from /spool/local by e7.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 29 May 2013 11:10:48 -0400 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by d01dlp03.pok.ibm.com (Postfix) with ESMTP id C07E2C9003E for ; Wed, 29 May 2013 11:10:45 -0400 (EDT) Received: from d01av05.pok.ibm.com (d01av05.pok.ibm.com [9.56.224.195]) by d01relay02.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r4TFAkSg262520 for ; Wed, 29 May 2013 11:10:46 -0400 Received: from d01av05.pok.ibm.com (loopback [127.0.0.1]) by d01av05.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r4TFAjnH006910 for ; Wed, 29 May 2013 11:10:45 -0400 Message-ID: <51A61A74.7050508@us.ibm.com> Date: Wed, 29 May 2013 08:10:44 -0700 From: Badari Pulavarty 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> <20130528083352.GA19799@hj.localdomain> <51A47244.9050203@linux.vnet.ibm.com> <51A5C4DB.9040307@linux.vnet.ibm.com> In-Reply-To: <51A5C4DB.9040307@linux.vnet.ibm.com> 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: Wenchao Xia Cc: Anthony Liguori , "Michael S. Tsirkin" , qemu-devel@nongnu.org, nab@linux-iscsi.org, Paolo Bonzini , Asias He On 05/29/2013 02:05 AM, Wenchao Xia wrote: > 于 2013-5-28 17:00, Wenchao Xia 写道: >> 于 2013-5-28 16:33, Asias He 写道: >>> On Tue, May 28, 2013 at 10:01:14AM +0200, Paolo Bonzini wrote: >>>> 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 >>> >>> For me, I always use targetcli utils instead of the sysfs interface. >>> targetcli in F18 has vhost support now. >>> >> Thanks very much for above information, I'll try it for test. >> > I have done a basic test of vhost-scsi, following is the result I'd > like to post, generally it seems fine: > > Result: > fdisk/mkfs: fdisk can find it, mke2fs works fine. > mount: can mount it. > file I/O: dd 90M zero to a file in that disk succeed. I tried without nested kvm. > > Issues: > 1) in fdisk -l, sometime timeout with dmesg "end_request: I/O error, > dev fd0, sector 0", I guess it is caused by nested KVM that failed > to kick host kernel? I don't see this issue. Are you sure "fd0" is actually the scsi device ? what is "fd0" ? > 2) in fdisk -l, it shows 512 bytes larger than the parameter I > specified in fd_dev_size parameter in configfs on host.(shows > 104858112 bytes, see the invocation script below) > I see the same. For some reason "fdisk -l" in the VM shows 512-bytes more than the actual size for the file (on the host). Thanks, Badari