s390x fixes for 2.11
The following changes since commit 2e02083438962d26ef9dcc7100f3b378104183db:
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2017-11-17 19:08:07 +0000)
are available in the git repository at:
git://github.com/cohuck/qemu tags/s390x-20171120-v1
for you to fetch changes up to 6cbf1ec85caf8a7d9f2fd829422c9f0a1c8983e1:
pc-bios/s390-ccw.img: update image (2017-11-20 16:04:11 +0100)
----------------------------------------------------------------
Fix storing cpu status (both kvm and tcg), locking around diag 308 (tcg only) and a non-zero variable in the s390-ccw bios.
----------------------------------------------------------------
Cornelia Huck (1):
pc-bios/s390-ccw.img: update image
David Hildenbrand (2):
s390x: fix storing CPU status (again)
s390x/tcg: fix DIAG 308 with > 1 VCPU (MTTCG)
Thomas Huth (1):
pc-bios/s390-ccw: Fix problem with invalid virtio-scsi LUN when
rebooting
pc-bios/s390-ccw.img | Bin 30520 -> 26416 bytes pc-bios/s390-ccw/virtio-scsi.c | 3 ++- target/s390x/helper.c | 2 +- target/s390x/misc_helper.c | 2 ++ 4 files changed, 5 insertions(+), 2 deletions(-)
Signature · 1 line
2.13.6
[Qemu-devel] [PULL for-2.11 1/4] s390x: fix storing CPU status (again)
From: David Hildenbrand <[email protected]>
Looks like the last fix + cleanup introduced another bug. (for now Linux guests don't seem to care) - we store the crs into ars.
Message-Id: <[email protected]>
--- target/s390x/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
target/s390x/helper.c +1 -1
@@ -279,7 +279,7 @@ int s390_store_status(S390CPU *cpu, hwaddr addr, bool store_arch) sa->ars[i] =cpu_to_be32 (cpu->env.aregs[i]); }for (i =0 ; i <16 ; ++i) { - sa->ars[i] =cpu_to_be64 (cpu->env.cregs[i]); + sa->crs[i] =cpu_to_be64 (cpu->env.cregs[i]); }cpu_physical_memory_unmap (sa, len,1 , len);
Signature · 1 line
2.13.6
[Qemu-devel] [PULL for-2.11 2/4] s390x/tcg: fix DIAG 308 with > 1 VCPU (MTTCG)
In reply to Cornelia HuckFrom: David Hildenbrand <[email protected]>
Currently, multi threaded TCG with > 1 VCPU gets stuck during IPL, when the bios tries to switch to the loaded kernel via DIAG 308.
As run_on_cpu() is used, we run into a deadlock after handling the reset. We need the iolock (just like KVM).
Message-Id: <[email protected]>
--- target/s390x/misc_helper.c | 2 ++ 1 file changed, 2 insertions(+)
target/s390x/misc_helper.c +2 -0
@@ -103,7 +103,9 @@ void HELPER(diag)(CPUS390XState *env, uint32_t r1, uint32_t r3, uint32_t num)break ;case 0x308 :/* ipl */ +qemu_mutex_lock_iothread ();handle_diag_308 (env, r1, r3); +qemu_mutex_unlock_iothread (); r =0 ;break ;case 0x288 :
Signature · 1 line
2.13.6
[Qemu-devel] [PULL for-2.11 3/4] pc-bios/s390-ccw: Fix problem with invalid virtio-scsi LUN when rebooting
In reply to Cornelia HuckFrom: Thomas Huth <[email protected]>
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.
Message-Id: <[email protected]>
--- pc-bios/s390-ccw/virtio-scsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
pc-bios/s390-ccw/virtio-scsi.c +2 -1
@@ -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 ;
Signature · 1 line
2.13.6
[Qemu-devel] [PULL for-2.11 4/4] pc-bios/s390-ccw.img: update image
In reply to Cornelia HuckContains the following commit:
- pc-bios/s390-ccw: Fix problem with invalid virtio-scsi LUN when rebooting
--- pc-bios/s390-ccw.img | Bin 30520 -> 26416 bytes 1 file changed, 0 insertions(+), 0 deletions(-)
pc-bios/s390-ccw.img binary +0 -0
Signature · 1 line
2.13.6
Peter Maydell
AppliedQuoted 29 lines · Cornelia Huck
The following changes since commit
2e02083438962d26ef9dcc7100f3b378104183db:Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2017-11-17 19:08:07 +0000)
are available in the git repository at:
git://github.com/cohuck/qemutags/s390x-20171120-v1for you to fetch changes up to
6cbf1ec85caf8a7d9f2fd829422c9f0a1c8983e1:pc-bios/s390-ccw.img: update image (2017-11-20 16:04:11 +0100)
----------------------------------------------------------------
Fix storing cpu status (both kvm and tcg), locking around diag 308 (tcg only) and a non-zero variable in the s390-ccw bios.----------------------------------------------------------------
Cornelia Huck (1):
pc-bios/s390-ccw.img: update imageDavid Hildenbrand (2):
s390x: fix storing CPU status (again)
s390x/tcg: fix DIAG 308 with > 1 VCPU (MTTCG)Thomas Huth (1):
pc-bios/s390-ccw: Fix problem with invalid virtio-scsi LUN when
rebooting
Quoted 5 lines
pc-bios/s390-ccw.img | Bin 30520 -> 26416 bytes pc-bios/s390-ccw/virtio-scsi.c | 3 ++- target/s390x/helper.c | 2 +- target/s390x/misc_helper.c | 2 ++ 4 files changed, 5 insertions(+), 2 deletions(-)
Applied, thanks.
-- PMM