mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
pc-bios/s390-ccw: Do not bail out early if not finding a SCSI disk
In case the user did not specify a boot device, we want to continue looking for other devices if there are no valid SCSI disks on a virtio- scsi controller. As a first step, do not panic in this case and let the control flow carry the error to the upper functions instead. Message-Id: <20200806105349.632-6-thuth@redhat.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
d2cf4af1f4
commit
605751b5a5
5 changed files with 37 additions and 16 deletions
|
@ -218,7 +218,7 @@ static void find_boot_device(void)
|
|||
IPL_assert(found, "Boot device not found\n");
|
||||
}
|
||||
|
||||
static void virtio_setup(void)
|
||||
static int virtio_setup(void)
|
||||
{
|
||||
VDev *vdev = virtio_get_device();
|
||||
QemuIplParameters *early_qipl = (QemuIplParameters *)QIPL_ADDRESS;
|
||||
|
@ -233,9 +233,14 @@ static void virtio_setup(void)
|
|||
sclp_print("Network boot device detected\n");
|
||||
vdev->netboot_start_addr = qipl.netboot_start_addr;
|
||||
} else {
|
||||
virtio_blk_setup_device(blk_schid);
|
||||
int ret = virtio_blk_setup_device(blk_schid);
|
||||
if (ret) {
|
||||
return ret;
|
||||
}
|
||||
IPL_assert(virtio_ipl_disk_is_valid(), "No valid IPL device detected");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ipl_boot_device(void)
|
||||
|
@ -246,8 +251,9 @@ static void ipl_boot_device(void)
|
|||
dasd_ipl(blk_schid, cutype); /* no return */
|
||||
break;
|
||||
case CU_TYPE_VIRTIO:
|
||||
virtio_setup();
|
||||
zipl_load(); /* no return */
|
||||
if (virtio_setup() == 0) {
|
||||
zipl_load(); /* no return */
|
||||
}
|
||||
break;
|
||||
default:
|
||||
print_int("Attempting to boot from unexpected device type", cutype);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue