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