On Tue, Nov 15, 2011 at 05:01:08PM +0100, Paolo Bonzini wrote:
Hi all,
this is the first bit of working code for the mythical virtio-scsi HBA. This patch mostly aims at making code more generic in SeaBIOS for both SCSI and virtio.
For SCSI, it introduces common bits for LUN detection and fixes some bugs. This is visible for example in that I can now boot the FreeDOS image on bochs.sf.net from a USB drive.
For virtio, it adds a few extra interface bits that are common to both virtio-scsi and virtio-blk.
The final patch adds the virtio-scsi code itself. I think the first 13 patches can go in before the virtio-scsi QEMU code, anyway I'm sending now the whole batch for review.
Thanks! The patch series looks good to me.
Question on patch 4 - can you elaborate on why waittick is needed?
On patch 5, the READ CAPACITY is made unconditional. The intent was to only run READ CAPACITY on harddrives, because CDROMs need to get the info from the CD and it can take some time (eg, 10 seconds) to spin the CD up on real hardware. One wouldn't want their computer to boot longer just because they had a CD in the drive on boot. (BTW, the check for blksize==CDROM_SECTOR_SIZE to force a CDROM type was something I added when testing - to the best of my knowledge no drive requires it.)
-Kevin