From: Cornelia Huck <cohuck@redhat.com>
To: peter.maydell@linaro.org
Cc: qemu-devel@nongnu.org, qemu-s390x@nongnu.org, rth@twiddle.net,
agraf@suse.de, thuth@redhat.com, borntraeger@de.ibm.com,
david@redhat.com, Cornelia Huck <cohuck@redhat.com>
Subject: [Qemu-devel] [PULL for-2.11 3/4] pc-bios/s390-ccw: Fix problem with invalid virtio-scsi LUN when rebooting
Date: Mon, 20 Nov 2017 16:21:44 +0100 [thread overview]
Message-ID: <20171120152145.25853-4-cohuck@redhat.com> (raw)
In-Reply-To: <20171120152145.25853-1-cohuck@redhat.com>
From: Thomas Huth <thuth@redhat.com>
When rebooting a guest that has a virtio-scsi disk, the s390-ccw
bios sometimes bails out with an error message like this:
! SCSI cannot report LUNs: STATUS=02 RSPN=70 KEY=05 CODE=25 QLFR=00, sure !
Enabling the scsi_req* tracing in QEMU shows that the ccw bios is
trying to execute the REPORT LUNS SCSI command with a LUN != 0, and
this causes the SCSI command to fail.
Looks like we neither clear the BSS of the s390-ccw bios during reboot,
nor do we explicitly set the default_scsi_device.lun value to 0, so
this variable can contain random values from the OS after the reboot.
By setting this variable explicitly to 0, the problem is fixed and
the reboots always succeed.
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1514352
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1510942228-22822-1-git-send-email-thuth@redhat.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
pc-bios/s390-ccw/virtio-scsi.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pc-bios/s390-ccw/virtio-scsi.c b/pc-bios/s390-ccw/virtio-scsi.c
index c92f5d3fa0..4fe4b9d261 100644
--- a/pc-bios/s390-ccw/virtio-scsi.c
+++ b/pc-bios/s390-ccw/virtio-scsi.c
@@ -223,7 +223,8 @@ static void virtio_scsi_locate_device(VDev *vdev)
for (target = 0; target <= vdev->config.scsi.max_target; target++) {
sdev->channel = channel;
- sdev->target = target; /* sdev->lun will be 0 here */
+ sdev->target = target;
+ sdev->lun = 0; /* LUN has to be 0 for REPORT LUNS */
if (!scsi_report_luns(vdev, data, sizeof(data))) {
if (resp.response == VIRTIO_SCSI_S_BAD_TARGET) {
continue;
--
2.13.6
next prev parent reply other threads:[~2017-11-20 15:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-20 15:21 [Qemu-devel] [PULL for-2.11 0/4] s390x fixes for 2.11 Cornelia Huck
2017-11-20 15:21 ` [Qemu-devel] [PULL for-2.11 1/4] s390x: fix storing CPU status (again) Cornelia Huck
2017-11-20 15:21 ` [Qemu-devel] [PULL for-2.11 2/4] s390x/tcg: fix DIAG 308 with > 1 VCPU (MTTCG) Cornelia Huck
2017-11-20 15:21 ` Cornelia Huck [this message]
2017-11-20 15:21 ` [Qemu-devel] [PULL for-2.11 4/4] pc-bios/s390-ccw.img: update image Cornelia Huck
2017-11-21 9:55 ` [Qemu-devel] [PULL for-2.11 0/4] s390x fixes for 2.11 Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171120152145.25853-4-cohuck@redhat.com \
--to=cohuck@redhat.com \
--cc=agraf@suse.de \
--cc=borntraeger@de.ibm.com \
--cc=david@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=rth@twiddle.net \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).