hw/s390x/ipl: Fix crash with virtio-scsi-pci device
commit99efaa2696caaf6182958e27d553449674894b27
authorThomas Huth <thuth@redhat.com>
Tue, 25 Apr 2017 13:18:47 +0000 (25 15:18 +0200)
committerCornelia Huck <cornelia.huck@de.ibm.com>
Tue, 2 May 2017 13:08:54 +0000 (2 15:08 +0200)
tree58fa2bf9af21463946cb4d6fa0c5e54a834aea54
parentc55144ec3262e8aeaf3e2e1e8fc48b07c993a654
hw/s390x/ipl: Fix crash with virtio-scsi-pci device

qemu-system-s390x currently crashes when it is started with a
virtio-scsi-pci device, e.g.:

 qemu-system-s390x -nographic -enable-kvm -device virtio-scsi-pci \
                   -drive file=/tmp/disk.dat,if=none,id=d1,format=raw \
                   -device scsi-cd,drive=d1,bootindex=1

The problem is that the code in s390_gen_initial_iplb() currently assumes
that all SCSI devices are also CCW devices, which is not the case for
virtio-scsi-pci of course. Fix it by adding an appropriate check for
TYPE_CCW_DEVICE here.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Message-Id: <1493126327-13162-1-git-send-email-thuth@redhat.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
hw/s390x/ipl.c