From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55062) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhEqj-0002CX-0H for qemu-devel@nongnu.org; Tue, 28 May 2013 04:01:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UhEqV-0002uk-1O for qemu-devel@nongnu.org; Tue, 28 May 2013 04:01:40 -0400 Received: from mail-ea0-x22b.google.com ([2a00:1450:4013:c01::22b]:53643) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhEqU-0002ub-RD for qemu-devel@nongnu.org; Tue, 28 May 2013 04:01:26 -0400 Received: by mail-ea0-f171.google.com with SMTP id b15so4464298eae.16 for ; Tue, 28 May 2013 01:01:26 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <51A4644A.6070002@redhat.com> Date: Tue, 28 May 2013 10:01:14 +0200 From: Paolo Bonzini 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> In-Reply-To: <51A4590F.90503@linux.vnet.ibm.com> Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 7bit 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: asias@redhat.com, qemu-devel@nongnu.org, nab@linux-iscsi.org, "Michael S. Tsirkin" 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