Given that the discussion on the spec has converged, here is finally the virtio-scsi device model.
The first patch is an (already posted) bug fix. The next 6 patches add scatter/gather support to the SCSI layer; the final 4 add the device---first a stub, and then progressively more features. Paolo Bonzini (9): qiov: prevent double free or use-after-free dma-helpers: make QEMUSGList target independent dma-helpers: add dma_buf_read and dma_buf_write dma-helpers: add accounting wrappers scsi: pass residual amount to command_complete scsi: add scatter/gather functionality scsi-disk: enable scatter/gather functionality virtio-scsi: add basic SCSI bus operation virtio-scsi: process control queue requests Stefan Hajnoczi (2): virtio-scsi: Add virtio-scsi stub device virtio-scsi: Add basic request processing infrastructure Makefile.target | 1 + cutils.c | 3 + default-configs/pci.mak | 1 + default-configs/s390x-softmmu.mak | 1 + dma-helpers.c | 36 +++ dma.h | 20 +- hw/esp.c | 5 +- hw/ide/ahci.c | 10 +- hw/lsi53c895a.c | 4 +- hw/pci.h | 1 + hw/s390-virtio-bus.c | 24 ++ hw/s390-virtio-bus.h | 2 + hw/scsi-bus.c | 35 ++- hw/scsi-disk.c | 63 ++++- hw/scsi.h | 7 +- hw/spapr_vscsi.c | 4 +- hw/usb-msd.c | 4 +- hw/virtio-pci.c | 41 +++ hw/virtio-pci.h | 2 + hw/virtio-scsi.c | 553 +++++++++++++++++++++++++++++++++++++ hw/virtio-scsi.h | 36 +++ hw/virtio.h | 3 + 22 files changed, 815 insertions(+), 41 deletions(-) create mode 100644 hw/virtio-scsi.c create mode 100644 hw/virtio-scsi.h -- 1.7.7.1