[SeaBIOS] [PATCH 2/2] virtio-scsi: speed up SCSI bus scan

2017-06-19 Thread Paolo Bonzini
The introduction of REPORT LUNS caused virtio-scsi to send two SCSI commands (INQUIRY and REPORT LUNS) to each target rather than just one. However, INQUIRY will only fail if _no_ LUN is present on that target. If all devices have LUN>0 is present, INQUIRY will report a dummy device. Therefore,

[SeaBIOS] [PATCH 0/2] scsi: fixes and improvements to bus scan

2017-06-19 Thread Paolo Bonzini
The first patch fixes a regression where many disks on a single SCSI target could prevent LUN0 from booting on another target. The second patch then exploits the new scanning algorithm to speed up the bus scan on virtio-scsi, which has a higher limit for the target than the other adaptors and

[SeaBIOS] [PATCH 1/2] scsi: ensure LUN0 is added first

2017-06-19 Thread Paolo Bonzini
The introduction of REPORT LUNS caused a potential regression when many disks are present on the same SCSI target. If LUN0 is processed too late, SeaBIOS might run out of memory and fail to register it. There are two kinds of problems: - QEMU presents the results of REPORT LUNS in the opposite

Re: [SeaBIOS] [PATCH 1/2] scsi: ensure LUN0 is added first

2017-06-19 Thread Roman Kagan
On Mon, Jun 19, 2017 at 06:21:09PM +0200, Paolo Bonzini wrote: > The introduction of REPORT LUNS caused a potential regression when > many disks are present on the same SCSI target. If LUN0 is processed > too late, SeaBIOS might run out of memory and fail to register it. > > There are two kinds