Skip to contentSkip to conversation

Fix for the s390-ccw bios

GIT PULL Applied Thomas Huth 2 participants 7 messages Nov 29, 2019

lore
Share & tools
lore
#0 lore raw

Hi Peter,

the following changes since commit 1a61a081ac33ae6cb7dd2e38d119a572f416c7f7:

Update version for v4.2.0-rc3 release (2019-11-26 21:52:26 +0000)

are available in the Git repository at:

https://gitlab.com/huth/qemu.git tags/pull-request-2019-11-29

for you to fetch changes up to bf876a688c9319b506d5ff1175ba7189cd933d91:

pc-bios/s390: Update firmware image with the "fix sclp_get_loadparm_ascii" patch (2019-11-29 10:12:33 +0100)

----------------------------------------------------------------
A fix for regression in the s390-ccw bios
----------------------------------------------------------------

... it would be good to still get this into 4.2 if possible!

Claudio Imbrenda (1):
pc-bios/s390-ccw: fix sclp_get_loadparm_ascii

Thomas Huth (1):
pc-bios/s390: Update firmware image with the "fix sclp_get_loadparm_ascii" patch

 pc-bios/s390-ccw.img     | Bin 42608 -> 42608 bytes
 pc-bios/s390-ccw/sclp.c  |   2 +-
 pc-bios/s390-netboot.img | Bin 67232 -> 67232 bytes
 3 files changed, 1 insertion(+), 1 deletion(-)
#1 lore raw

[PULL 2/2] pc-bios/s390: Update firmware image with the "fix sclp_get_loadparm_ascii" patch

This fixes various boot scenarios, e.g. the possibility to use "-boot menu=on".

---
 pc-bios/s390-ccw.img     | Bin 42608 -> 42608 bytes
 pc-bios/s390-netboot.img | Bin 67232 -> 67232 bytes
 2 files changed, 0 insertions(+), 0 deletions(-)
pc-bios/s390-ccw.img binary +0 -0
index a0234bf748e10fdfaab27b8a751bee1db1865256..c84ae93561ddfa3e1749f81ff62e60aad97fc061 100644
GIT binary patch
pc-bios/s390-netboot.img binary +0 -0
index b984ad0da08f1401978b173d44e935d5563dde70..f9ef28ef1a3879b5ee0cdb45cb5a3a74965e82ba 100644
GIT binary patch
Signature · 1 line
2.18.1
#2 lore raw

[PULL 1/2] pc-bios/s390-ccw: fix sclp_get_loadparm_ascii

In reply to Thomas Huth

From: Claudio Imbrenda <[email protected]>

The existing s390 bios gets the LOADPARM information from the system using an SCLP call that specifies a buffer length too small to contain all the output.

The recent fixes in the SCLP code have exposed this bug, since now the SCLP call will return an error (as per architecture) instead of writing partially and completing successfully.

The solution is simply to specify the full page length as the SCCB length instead of a smaller size.

Fixes 832be0d8a3bb ("s390x: sclp: Report insufficient SCCB length")
Fixes 9a22473c70f3 ("pc-bios/s390-ccw: get LOADPARM stored in SCP Read Info")

Message-Id: <[email protected]>

---
 pc-bios/s390-ccw/sclp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
pc-bios/s390-ccw/sclp.c +1 -1
index c0223fab0b..7251f9af4d 100644
@@ -112,7 +112,7 @@ void sclp_get_loadparm_ascii(char *loadparm)
     ReadInfo *sccb = (void *)_sccb;
 
     memset((char *)_sccb, 0, sizeof(ReadInfo));
-    sccb->h.length = sizeof(ReadInfo);
+    sccb->h.length = SCCB_SIZE;
     if (!sclp_service_call(SCLP_CMDW_READ_SCP_INFO, sccb)) {
         ebcdic_to_ascii((char *) sccb->loadparm, loadparm, LOADPARM_LEN);
     }
Signature · 1 line
2.18.1
#3 lore raw
In reply to Thomas Huth
Quoted 13 lines · Thomas Huth

Hi Peter,

the following changes since commit 1a61a081ac33ae6cb7dd2e38d119a572f416c7f7:

Update version for v4.2.0-rc3 release (2019-11-26 21:52:26 +0000)

are available in the Git repository at:

https://gitlab.com/huth/qemu.git tags/pull-request-2019-11-29

for you to fetch changes up to bf876a688c9319b506d5ff1175ba7189cd933d91:

Quoted 7 lines

pc-bios/s390: Update firmware image with the "fix sclp_get_loadparm_ascii" patch (2019-11-29 10:12:33 +0100)

----------------------------------------------------------------
A fix for regression in the s390-ccw bios
----------------------------------------------------------------

... it would be good to still get this into 4.2 if possible!

Well, it's possible, but this is currently the only thing that would need an rc4, so the question is how important is the regression and how safe is the fix? If it's just a minor corner case then it's tempting to not have an rc4 unless we need it for some other reason.

Summary: it can go into 4.2 but you need to provide some rationale in the pullreq cover letter to make the case for it :-)

thanks
-- PMM

#4 lore raw
Quoted 22 lines · Peter Maydell
Quoted 13 lines · Thomas Huth

Hi Peter,

the following changes since commit 1a61a081ac33ae6cb7dd2e38d119a572f416c7f7:

Update version for v4.2.0-rc3 release (2019-11-26 21:52:26 +0000)

are available in the Git repository at:

https://gitlab.com/huth/qemu.git tags/pull-request-2019-11-29

for you to fetch changes up to bf876a688c9319b506d5ff1175ba7189cd933d91:

Quoted 7 lines

pc-bios/s390: Update firmware image with the "fix sclp_get_loadparm_ascii" patch (2019-11-29 10:12:33 +0100)

----------------------------------------------------------------
A fix for regression in the s390-ccw bios
----------------------------------------------------------------

... it would be good to still get this into 4.2 if possible!

Quoted 8 lines

Well, it's possible, but this is currently the only thing that would need an rc4, so the question is how important is the regression and how safe is the fix? If it's just a minor corner case then it's tempting to not have an rc4 unless we need it for some other reason.

Summary: it can go into 4.2 but you need to provide some rationale in the pullreq cover letter to make the case for it :-)

Hi Peter,

without the fix, certain boot scenarios break:

- "-boot menu=on" does not work anymore.

- It's not possible anymore to specify the s390x-specific "loadparm" option (can be used e.g. with "-machine s390-ccw-virtio,loadparm=xyz") This is e.g. important for booting alternate kernel that are installed on the guest's hard disk image.

The fix is just a one-liner, has been reviewed and tested by multiple people already, so it should not cause any other regressions.

I think you could merge it also without doing another RC next week - the people who care about s390x on the list already have checked the fix, so we won't get too much additional testing coverage if you release yet another RC before the final release.

Thomas

#5 lore raw
Quoted 11 lines · Thomas Huth

without the fix, certain boot scenarios break:

- "-boot menu=on" does not work anymore.

- It's not possible anymore to specify the s390x-specific "loadparm" option (can be used e.g. with "-machine s390-ccw-virtio,loadparm=xyz") This is e.g. important for booting alternate kernel that are installed on the guest's hard disk image.

The fix is just a one-liner, has been reviewed and tested by multiple people already, so it should not cause any other regressions.

OK, that sounds worth fixing.

Quoted 1 line

I think you could merge it also without doing another RC next week

I never do releases which have any changes which haven't been in an RC. This is a rule I'm not willing to break. Sometimes we do an RC with less than the usual week's delay if there's just one last simple bug to be fixed.

thanks
-- PMM

#6 lore raw
In reply to Thomas Huth
Quoted 11 lines · Thomas Huth

Hi Peter,

the following changes since commit 1a61a081ac33ae6cb7dd2e38d119a572f416c7f7:

Update version for v4.2.0-rc3 release (2019-11-26 21:52:26 +0000)

are available in the Git repository at:

https://gitlab.com/huth/qemu.git tags/pull-request-2019-11-29

Quoted 7 lines

for you to fetch changes up to bf876a688c9319b506d5ff1175ba7189cd933d91:

pc-bios/s390: Update firmware image with the "fix sclp_get_loadparm_ascii" patch (2019-11-29 10:12:33 +0100)

----------------------------------------------------------------
A fix for regression in the s390-ccw bios
----------------------------------------------------------------

Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/4.2
for any user-visible changes.

-- PMM