qemu-e2k/pc-bios/s390-ccw
Eric Farman fe921fc8b7 pc-bios/s390-ccw: Get Block Limits VPD device data
The "Block Limits" Inquiry VPD page is optional for any SCSI device,
but if it's supported it provides a hint of the maximum I/O transfer
length for this particular device. If this page is supported by the
disk, let's issue that Inquiry and use the minimum of it and the
SCSI controller limit. That will cover this scenario:

  qemu-system-s390x ...
    -device virtio-scsi-ccw,id=scsi0,max_sectors=32768 ...
    -drive file=/dev/sda,if=none,id=drive0,format=raw ...
    -device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,
            drive=drive0,id=disk0,max_io_size=1048576

controller: 32768 sectors x 512 bytes/sector = 16777216 bytes
      disk:                                     1048576 bytes

Now that we have a limit for a virtio-scsi disk, compare that with the
limit for the virtio-scsi controller when we actually build the I/O.
The minimum of these two limits should be the one we use.

Signed-off-by: Eric Farman <farman@linux.vnet.ibm.com>
Message-Id: <20170510155359.32727-7-farman@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2017-05-19 12:29:01 +02:00
..
bootmap.c pc-bios/s390-ccw: add boot entry selection to El Torito routine 2017-05-02 15:08:54 +02:00
bootmap.h pc-bios/s390-ccw: add boot entry selection for ECKD DASD 2017-05-02 15:08:54 +02:00
cio.h
iplb.h
main.c pc-bios/s390-ccw: provide a function to interpret LOADPARM value 2017-05-02 15:08:54 +02:00
Makefile pc-bios/s390-ccw: get LOADPARM stored in SCP Read Info 2017-05-02 15:08:54 +02:00
s390-ccw.h pc-bios/s390-ccw: Break up virtio-scsi read into multiples 2017-05-19 12:29:01 +02:00
sclp.c pc-bios/s390-ccw: get LOADPARM stored in SCP Read Info 2017-05-02 15:08:54 +02:00
sclp.h pc-bios/s390-ccw: get LOADPARM stored in SCP Read Info 2017-05-02 15:08:54 +02:00
scsi.h pc-bios/s390-ccw: Get Block Limits VPD device data 2017-05-19 12:29:01 +02:00
start.S
virtio-scsi.c pc-bios/s390-ccw: Get Block Limits VPD device data 2017-05-19 12:29:01 +02:00
virtio-scsi.h
virtio.c
virtio.h pc-bios/s390-ccw: Get Block Limits VPD device data 2017-05-19 12:29:01 +02:00