This is the third part in my SCSI s/g series. From quick benchmarking, it speeds up some workloads by 2-4 times. Benefits vary depending on the number of sectors read/written by the typical operation. More precise numbers of course will come.
Unlike the previous attempts, which forced devices to use an iovec provided by the HBA, here the devices can choose whether to use the old mechanism or the iovecs. In addition, I do not plan to add this to real devices, only paravirtual. For this reason, this series includes an emulation of the vmware pvscsi device (the emulation is complete except for hotplug and PIO operation, both of which are undocumented AFAICS). The series currently depends on the cpu_physical_memory_fast operations. The dependency can be removed if necessary though. In fact, I would like an overall comment on the API since I might as well drop pvscsi completely and just implement this for virtio-scsi. Paolo Bonzini (9): make qbus_reset_all public pvscsi: first commit pvscsi: check validity of DMA addresses in advance scsi: always use get_sense scsi-disk: lazily allocate bounce buffer allow switching a qiov between internal and external storage scsi: push qiov to SCSIRequest scsi: add get_iovec to SCSIBusOps pvscsi: implement s/g operation without a bounce buffer Makefile.objs | 1 + cutils.c | 14 +- default-configs/pci.mak | 1 + hw/pci.h | 1 + hw/qdev.c | 7 +- hw/qdev.h | 2 +- hw/scsi-bus.c | 20 +- hw/scsi-disk.c | 62 ++- hw/scsi.h | 4 + hw/spapr_vscsi.c | 90 +---- hw/vmw_pvscsi.c | 1014 +++++++++++++++++++++++++++++++++++++++++++++++ hw/vmw_pvscsi.h | 389 ++++++++++++++++++ trace-events | 15 + vl.c | 2 +- 14 files changed, 1518 insertions(+), 104 deletions(-) create mode 100644 hw/vmw_pvscsi.c create mode 100644 hw/vmw_pvscsi.h -- 1.7.4.4