qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Cornelia Huck <cohuck@redhat.com>, Janosch Frank <frankja@linux.ibm.com>
Cc: borntraeger@de.ibm.com, qemu-s390x@nongnu.org,
	mihajlov@linux.ibm.com, qemu-devel@nongnu.org
Subject: Re: [PATCH v3 4/4] pc-bios/s390x: Fix reset psw mask
Date: Tue, 17 Dec 2019 16:09:27 +0100	[thread overview]
Message-ID: <e049b13a-5094-cd42-72d9-a5cfdca01d78@redhat.com> (raw)
In-Reply-To: <7d8f46eb-a08c-a678-1638-4634a6e675a3@redhat.com>

On 17/12/2019 13.36, Thomas Huth wrote:
> On 13/12/2019 13.06, Cornelia Huck wrote:
>> On Thu, 5 Dec 2019 11:12:39 +0100
>> Cornelia Huck <cohuck@redhat.com> wrote:
>>
>>> On Tue,  3 Dec 2019 08:28:13 -0500
>>> Janosch Frank <frankja@linux.ibm.com> wrote:
>>>
>>>> We need to set the short psw indication bit in the reset psw, as it is
>>>> a short psw.
>>>>
>>>> fixes: 9629823290 ("pc-bios/s390-ccw: do a subsystem reset before running the guest")
>>>> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
>>>> ---
>>>>  pc-bios/s390-ccw/jump2ipl.c | 12 +++++++-----
>>>>  1 file changed, 7 insertions(+), 5 deletions(-)  
>>>
>>> Thanks, applied (together with a rebuild of the bios images.)
>>
>> This unfortunately breaks 'make check-qtest-s390x':
>>
>>    TEST    check-qtest-s390x: tests/boot-serial-test
>>    TEST    check-qtest-s390x: tests/pxe-test
>> ERROR - too few tests run (expected 1, got 0)
>>
>> When I revert this, the rebuild, and "s390x: Properly fetch and test
>> the short psw on diag308 subc 0/1" (as it exposes the bug this commit
>> tried to fix), everything passes again. No idea what is wrong, though :(
>>
>> For now, I've dropped the three patches mentioned above from the
>> s390-next branch (I plan to send a pull request later). Let's fix this
>> on top once we figured out whatever went wrong, no need to rush here.
> 
> I think I might have found the problem. You now need this patch on top
> to get it working again:
> 
> diff a/pc-bios/s390-ccw/jump2ipl.c b/pc-bios/s390-ccw/jump2ipl.c
> --- a/pc-bios/s390-ccw/jump2ipl.c
> +++ b/pc-bios/s390-ccw/jump2ipl.c
> @@ -18,7 +18,7 @@
>  typedef struct ResetInfo {
>      uint64_t ipl_psw;
>      uint32_t ipl_continue;
> -} ResetInfo;
> +} __attribute__((packed)) ResetInfo;
> 
>  static ResetInfo save;
> 
> Without this patch, there is now a 32-bit padding in the struct. Not
> sure why it then fails (I had a quick look at the disassembly of
> jump2ipl.o and could not spot anything that was obviously wrong), but if
> I mark the struct as "packed" to get the old size again, then the
> pxe-test is working fine for me again.

Never mind, the problem was not in the jump2ipl.c code, but in the
pxe-test: The code only worked if the r3 register contained only zeroes
in the upper bits. The changes to jump2ipl.c here caused the compiler to
put a different value in r3, so the test suddenly crashed. I've now sent
a patch to fix the test ("tests/boot-sector: Fix the bad s390x assembler
code").

 Thomas



  reply	other threads:[~2019-12-17 15:10 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-03 13:28 [PATCH v3 0/4] s390x: Increase architectural compliance Janosch Frank
2019-12-03 13:28 ` [PATCH v3 1/4] Header sync Janosch Frank
2019-12-03 13:28 ` [PATCH v3 2/4] s390x: Add missing vcpu reset functions Janosch Frank
2019-12-03 17:44   ` Cornelia Huck
2019-12-04  9:00     ` Janosch Frank
2019-12-04  9:15       ` Cornelia Huck
2019-12-04 14:59   ` Cornelia Huck
2019-12-04 15:07     ` David Hildenbrand
2019-12-04 15:08       ` David Hildenbrand
2019-12-04 15:33         ` Cornelia Huck
2019-12-04 15:35           ` David Hildenbrand
2019-12-03 13:28 ` [PATCH v3 3/4] s390x: Fix cpu normal reset ri clearing Janosch Frank
2019-12-05 13:32   ` Cornelia Huck
2019-12-03 13:28 ` [PATCH v3 4/4] pc-bios/s390x: Fix reset psw mask Janosch Frank
2019-12-03 13:33   ` Christian Borntraeger
2019-12-03 17:18     ` Cornelia Huck
2019-12-03 17:22   ` Cornelia Huck
2019-12-03 18:32   ` Christian Borntraeger
2019-12-05 10:12   ` Cornelia Huck
2019-12-13 12:06     ` Cornelia Huck
2019-12-13 12:37       ` Janosch Frank
2019-12-17 12:36       ` Thomas Huth
2019-12-17 15:09         ` Thomas Huth [this message]
2019-12-18 12:15           ` Janosch Frank
2019-12-18 12:28   ` Cornelia Huck
2019-12-18 16:54   ` Cornelia Huck

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=e049b13a-5094-cd42-72d9-a5cfdca01d78@redhat.com \
    --to=thuth@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=mihajlov@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    /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).