From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52204) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCV5G-0006K6-Gi for qemu-devel@nongnu.org; Fri, 14 Sep 2012 08:33:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TCV5B-0002ot-Mb for qemu-devel@nongnu.org; Fri, 14 Sep 2012 08:33:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:17612) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCV5B-0002ok-Er for qemu-devel@nongnu.org; Fri, 14 Sep 2012 08:33:17 -0400 Date: Fri, 14 Sep 2012 15:34:16 +0300 From: "Michael S. Tsirkin" Message-ID: <20120914123416.GF1490@redhat.com> 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> <5052D277.7010900@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5052D277.7010900@redhat.com> 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: Paolo Bonzini Cc: Anthony Liguori , Stefan Hajnoczi , kvm-devel , Jan Kiszka , Zhi Yong Wu , qemu-devel , "Nicholas A. Bellinger" , lf-virt , Anthony Liguori , target-devel , Hannes Reinecke , Zhi Yong Wu , Christoph Hellwig On Fri, Sep 14, 2012 at 08:45:11AM +0200, Paolo Bonzini wrote: > 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. All configuration changes are handled in userspace. > 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 I think I like the second option better. -- MST