From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Janosch Frank <frankja@linux.ibm.com>, qemu-devel@nongnu.org
Cc: thuth@redhat.com, cohuck@redhat.com, david@redhat.com
Subject: Re: [PATCH 7/7] pc-bios: s390x: Setup io and ext new psws only once
Date: Wed, 15 Jul 2020 15:16:44 +0200 [thread overview]
Message-ID: <033b0db7-7b7d-6eb0-9018-bcc342f13509@de.ibm.com> (raw)
In-Reply-To: <33fd76e8-ec0f-4cbe-9e84-6197696f70a3@linux.ibm.com>
On 15.07.20 15:13, Janosch Frank wrote:
> On 7/15/20 11:40 AM, Janosch Frank wrote:
>> Absolutely no need to set them up every time before we enable our
>> interrupt masks.
>>
>> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
>
> So, this one doesn't seem to be a great idea as a kernel loaded to 0x0
> will overwrite the ext/io new PSWs and we'll then try to load a zero PSW
> when an IRQ hits.
>
> We have two options:
> * Add a piece of code that fixes the low core after a kernel has been loaded
> * Leave the code as is and add a comment, so other people don't fall
> into this trap.
>
> I'd be fine with both and for now I'd settle for the second option.
Yes, leave it as is and add a comment.
>
>> ---
>> pc-bios/s390-ccw/start.S | 30 +++++++++++++-----------------
>> 1 file changed, 13 insertions(+), 17 deletions(-)
>>
>> diff --git a/pc-bios/s390-ccw/start.S b/pc-bios/s390-ccw/start.S
>> index 01c4c21b26..0059a15d21 100644
>> --- a/pc-bios/s390-ccw/start.S
>> +++ b/pc-bios/s390-ccw/start.S
>> @@ -34,6 +34,12 @@ loop:
>> remainder:
>> larl %r2,memsetxc
>> ex %r3,0(%r2)
>> + /* Store io new PSW */
>> + larl %r1,io_new_psw
>> + mvc 0x1f0(16),0(%r1)
>> + /* Store ext new PSW */
>> + larl %r1,external_new_psw
>> + mvc 0x1b0(16),0(%r1)
>> done:
>> j main /* And call C */
>>
>> @@ -64,11 +70,6 @@ consume_sclp_int:
>> stctg %c0,%c0,0(%r15)
>> oi 6(%r15),0x2
>> lctlg %c0,%c0,0(%r15)
>> - /* prepare external call handler */
>> - larl %r1, external_new_code
>> - stg %r1, 0x1b8
>> - larl %r1, external_new_mask
>> - mvc 0x1b0(8),0(%r1)
>> /* load enabled wait PSW */
>> larl %r1, enabled_wait_psw
>> lpswe 0(%r1)
>> @@ -81,14 +82,9 @@ consume_sclp_int:
>> .globl consume_io_int
>> consume_io_int:
>> /* enable I/O interrupts in cr6 */
>> - stctg %c6,%c6,0(%r15)
>> - oi 4(%r15), 0xff
>> - lctlg %c6,%c6,0(%r15)
>> - /* prepare i/o call handler */
>> - larl %r1, io_new_code
>> - stg %r1, 0x1f8
>> - larl %r1, io_new_mask
>> - mvc 0x1f0(8),0(%r1)
>> + stctg %c6, %c6, 0(%r15)
>> + oi 4(%r15), 0xff
>> + lctlg %c6, %c6, 0(%r15)
>> /* load enabled wait PSW */
>> larl %r1, enabled_wait_psw
>> lpswe 0(%r1)
>> @@ -112,7 +108,7 @@ disabled_wait_psw:
>> .quad PSW_MASK_DWAIT, 0x0000000000000000
>> enabled_wait_psw:
>> .quad PSW_MASK_EWAIT, 0x0000000000000000
>> -external_new_mask:
>> - .quad PSW_MASK_64
>> -io_new_mask:
>> - .quad PSW_MASK_64
>> +external_new_psw:
>> + .quad PSW_MASK_64, external_new_code
>> +io_new_psw:
>> + .quad PSW_MASK_64, io_new_code
>>
>
>
next prev parent reply other threads:[~2020-07-15 13:19 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-15 9:40 [PATCH 0/7] pc-bios: s390x: Cleanup part 2 Janosch Frank
2020-07-15 9:40 ` [PATCH 1/7] pc-bios: s390x: Fix bootmap.c zipl component entry data handling Janosch Frank
2020-07-17 15:05 ` Thomas Huth
2020-07-22 6:50 ` Christian Borntraeger
2020-07-22 7:30 ` Janosch Frank
2020-07-22 7:33 ` Christian Borntraeger
2020-07-22 8:06 ` Janosch Frank
2020-07-15 9:40 ` [PATCH 2/7] pc-bios: s390x: Cleanup jump to ipl code Janosch Frank
2020-07-17 15:13 ` Thomas Huth
2020-07-21 13:07 ` Janosch Frank
2020-07-21 13:54 ` Christian Borntraeger
2020-07-15 9:40 ` [PATCH 3/7] pc-bios: s390x: Remove unneeded dasd-ipl.c reset psw mask changes Janosch Frank
2020-07-20 11:45 ` Thomas Huth
2020-07-20 12:16 ` Janosch Frank
2020-07-21 7:10 ` Thomas Huth
2020-07-15 9:40 ` [PATCH 4/7] pc-bios: s390x: Rework data initialization Janosch Frank
2020-07-20 11:56 ` Thomas Huth
2020-07-20 12:10 ` Janosch Frank
2020-07-15 9:40 ` [PATCH 5/7] pc-bios: s390x: Replace lowcore offsets with pointers in dasd-ipl.c Janosch Frank
2020-07-21 7:00 ` Thomas Huth
2020-07-15 9:40 ` [PATCH 6/7] pc-bios: s390x: Use PSW constants in start.S Janosch Frank
2020-07-21 7:05 ` Thomas Huth
2020-07-22 6:47 ` Christian Borntraeger
2020-07-15 9:40 ` [PATCH 7/7] pc-bios: s390x: Setup io and ext new psws only once Janosch Frank
2020-07-15 13:13 ` Janosch Frank
2020-07-15 13:16 ` Christian Borntraeger [this message]
2020-07-15 14:08 ` [PATCH] pc-bios: s390x: Add a comment to the io and external new PSW setup Janosch Frank
2020-07-21 7:03 ` Thomas Huth
2020-07-22 6:43 ` Christian Borntraeger
2020-07-22 7:24 ` Janosch Frank
2020-07-22 7:39 ` Christian Borntraeger
2020-07-22 8:05 ` Janosch Frank
2020-08-27 9:20 ` Thomas Huth
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=033b0db7-7b7d-6eb0-9018-bcc342f13509@de.ibm.com \
--to=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.