hw: Add support for LSI SAS1068 (mptsas) device
commite351b82611293683c4cabe4b69b7552bde5d4e2a
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 27 Oct 2015 17:26:06 +0000 (27 18:26 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 9 Feb 2016 14:45:26 +0000 (9 15:45 +0100)
tree18a4b09801182a346fb264babf675113ca8b356c
parent9fd7e85938e87ca52dcb1aeff34fa1675917831b
hw: Add support for LSI SAS1068 (mptsas) device

This adds the SAS1068 device, a SAS disk controller used in VMware that
is oldish but widely supported and has decent performance.  Unlike
megasas, it presents itself as a SAS controller and not as a RAID
controller.  The device corresponds to the mptsas kernel driver in
Linux.

A few small things in the device setup are based on Don Slutz's old
patch, but the device emulation was written from scratch based on Don's
SeaBIOS patch and on the FreeBSD and Linux drivers.  It is 2400 lines
shorter than Don's patch (and roughly the same size as MegaSAS---also
because it doesn't support the similar SPI controller), implements SCSI
task management functions (with asynchronous cancellation), supports
big-endian hosts, has complete support for migration and follows the
QEMU coding standards much more closely.

To write the driver, I first split Don's patch in two parts, with
the configuration bits in one file and the rest in a separate file.
I first left mptconfig.c in place and rewrote the rest, then deleted
mptconfig.c as well.  The configuration pages are still based mostly on
VirtualBox's, though not exactly the same.  However, the implementation
is completely different.  The contents of the pages themselves should
not be copyrightable.

Signed-off-by: Don Slutz <Don@CloudSwitch.com>
Message-Id: <1347382813-5662-1-git-send-email-Don@CloudSwitch.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
default-configs/pci.mak
hw/scsi/Makefile.objs
hw/scsi/mpi.h [new file with mode: 0644]
hw/scsi/mptconfig.c [new file with mode: 0644]
hw/scsi/mptendian.c [new file with mode: 0644]
hw/scsi/mptsas.c [new file with mode: 0644]
hw/scsi/mptsas.h [new file with mode: 0644]
include/hw/pci/pci_ids.h
trace-events