s390: Ensure IPL from SCSI works as expected
commit789b5a401b330510da663b4d4ae1ef8a7410c353
authorViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
Thu, 5 Apr 2018 15:07:23 +0000 (5 17:07 +0200)
committerCornelia Huck <cohuck@redhat.com>
Mon, 9 Apr 2018 11:50:31 +0000 (9 13:50 +0200)
treeedfbb1f5be737ab61cf41875b343b9795bc2f21a
parent11ef6d50fcfaa29e547c9755bdc56b093bb9ba67
s390: Ensure IPL from SCSI works as expected

Operating systems may request an IPL from a virtio-scsi device
by specifying an IPL parameter type of CCW. In this case QEMU
won't set up the IPLB correctly. The BIOS will still detect
it's a SCSI device to boot from, but it will now have to search
for the first LUN and attempt to boot from there.
However this may not be the original boot LUN if there's more than
one SCSI disk attached to the HBA.

With this change QEMU will detect that the request is for a
SCSI device and will rebuild the initial IPL parameter info
if it's the SCSI device used for the first boot. In consequence
the BIOS can use the boot LUN from the IPL information block.

In case a different SCSI device has been set, the BIOS will find
and use the first available LUN.

Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
Message-Id: <1522940844-12336-3-git-send-email-mihajlov@linux.vnet.ibm.com>
Reviewed-by: Farhan Ali <alifm@linux.vnet.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
hw/s390x/ipl.c