From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34176) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCPeV-0005hK-Jg for qemu-devel@nongnu.org; Fri, 14 Sep 2012 02:45:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TCPeP-0003Rq-Ph for qemu-devel@nongnu.org; Fri, 14 Sep 2012 02:45:23 -0400 Received: from mail-we0-f173.google.com ([74.125.82.173]:55440) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCPeP-0003RJ-J1 for qemu-devel@nongnu.org; Fri, 14 Sep 2012 02:45:17 -0400 Received: by weyz53 with SMTP id z53so2111290wey.4 for ; Thu, 13 Sep 2012 23:45:16 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5052D277.7010900@redhat.com> Date: Fri, 14 Sep 2012 08:45:11 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1347000499-28701-1-git-send-email-nab@linux-iscsi.org> <1347000499-28701-5-git-send-email-nab@linux-iscsi.org> <504A1A32.5050705@redhat.com> <20120908224032.GC20588@redhat.com> <504D85D6.2090703@redhat.com> <20120910062437.GD16819@redhat.com> <504F40BA.7020800@us.ibm.com> <20120911150757.GA26666@redhat.com> <1347575263.7359.76.camel@haakon2.linux-iscsi.org> In-Reply-To: <1347575263.7359.76.camel@haakon2.linux-iscsi.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 4/5] virtio-scsi: Add start/stop functionality for vhost-scsi List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Nicholas A. Bellinger" Cc: Anthony Liguori , Stefan Hajnoczi , kvm-devel , "Michael S. Tsirkin" , Jan Kiszka , Zhi Yong Wu , qemu-devel , lf-virt , Anthony Liguori , target-devel , Hannes Reinecke , Zhi Yong Wu , Christoph Hellwig Il 14/09/2012 00:27, Nicholas A. Bellinger ha scritto: > *) Keep vhost-scsi as a backend to virtio-scsi-pci > > - Reduces duplicated code amongst multiple virtio-scsi backends. > > - Follows the split for what existing vhost-net code already does. > > So that said, two quick questions for Paolo & Co.. > > For the standalone vhost-scsi-pci device case, can you give a brief idea > as to what extent you'd like to see virtio-scsi.c code/defs duplicated > and/or shared amongst a new vhost-scsi-pci device..? Not much, in the end, would be shared; it could end up being just parts of virtio_scsi_init and virtio_scsi_exit, and virtio_scsi_get_config. Almost all the other code is to implement the SCSI bus interface, which you do not need. I don't remember if and how vhost handles configuration changes. If you need any struct in virtio-scsi.c, either move it to virtio-scsi.h or add the new device in the same file. > Also to help me along, can you give an example based on the current > usage below how the QEMU command line arguments would change with a > standalone vhost-scsi-pci device..? > > ./x86_64-softmmu/qemu-system-x86_64 -enable-kvm -smp 4 -m 2048 \ > -hda /usr/src/qemu-vhost.git/debian_squeeze_amd64_standard-old.qcow2 \ > -vhost-scsi id=vhost-scsi0,wwpn=naa.600140579ad21088,tpgt=1 \ > -device virtio-scsi-pci,vhost-scsi=vhost-scsi0,event_idx=off Two possibilities. Either simply do s/virtio-scsi-pci/vhost-scsi-pci/ or do ./x86_64-softmmu/qemu-system-x86_64 -enable-kvm -smp 4 -m 2048 \ -hda /usr/src/qemu-vhost.git/debian_squeeze_amd64_standard-old.qcow2 \ -device virtio-scsi-pci,wwpn=naa.600140579ad21088,tpgt=1,event_idx=off