aboutsummaryrefslogtreecommitdiff
path: root/pc-bios/s390-ccw/virtio-scsi.c
diff options
context:
space:
mode:
authorEugene (jno) Dvurechenski <jno@linux.vnet.ibm.com>2016-06-01 15:25:51 +0200
committerCornelia Huck <cornelia.huck@de.ibm.com>2016-07-11 09:48:05 +0200
commitb39b7718dc23e9890ea7e770f543e6f2d17cb31b (patch)
tree853fa5d094ee7f24f0748a15ee8623f7b6ec38d3 /pc-bios/s390-ccw/virtio-scsi.c
parent4f4a9ca4a4386c137301b3662faba076455ff15a (diff)
pc-bios/s390-ccw: Pass selected SCSI device to IPL
There is ,bootindex=%d argument to specify the lookup order of boot devices. If a bootindex assigned to the device, then IPL Parameter Info Block is created for that device when it is IPLed from. If it is a mere SCSI device (not FCP), then IPIB is created with a special SCSI type and its fields are used to store SCSI address of the device. This new ipl block is private to qemu for now. If the device to IPL from is specified this way, then SCSI bus lookup is bypassed and prescribed devices uses the address specified. Signed-off-by: Eugene (jno) Dvurechenski <jno@linux.vnet.ibm.com> Signed-off-by: Alexander Yarygin <yarygin@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'pc-bios/s390-ccw/virtio-scsi.c')
-rw-r--r--pc-bios/s390-ccw/virtio-scsi.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/pc-bios/s390-ccw/virtio-scsi.c b/pc-bios/s390-ccw/virtio-scsi.c
index 3bb48e917e..d850a8deed 100644
--- a/pc-bios/s390-ccw/virtio-scsi.c
+++ b/pc-bios/s390-ccw/virtio-scsi.c
@@ -204,6 +204,17 @@ static void virtio_scsi_locate_device(VDev *vdev)
debug_print_int("config.scsi.max_target ", vdev->config.scsi.max_target);
debug_print_int("config.scsi.max_lun ", vdev->config.scsi.max_lun);
+ if (vdev->scsi_device_selected) {
+ sdev->channel = vdev->selected_scsi_device.channel;
+ sdev->target = vdev->selected_scsi_device.target;
+ sdev->lun = vdev->selected_scsi_device.lun;
+
+ IPL_check(sdev->channel == 0, "non-zero channel requested");
+ IPL_check(sdev->target <= vdev->config.scsi.max_target, "target# high");
+ IPL_check(sdev->lun <= vdev->config.scsi.max_lun, "LUN# high");
+ return;
+ }
+
for (target = 0; target <= vdev->config.scsi.max_target; target++) {
sdev->channel = channel;
sdev->target = target; /* sdev->lun will be 0 here */