From: Pierre Morel <pmorel@linux.ibm.com>
To: Janosch Frank <frankja@linux.ibm.com>, kvm@vger.kernel.org
Cc: linux-s390@vger.kernel.org, david@redhat.com, thuth@redhat.com,
cohuck@redhat.com
Subject: Re: [kvm-unit-tests PATCH v5 02/10] s390x: Use PSW bits definitions in cstart
Date: Wed, 22 Apr 2020 11:06:31 +0200 [thread overview]
Message-ID: <1b38a0e5-76cf-c3da-fe8d-7a75bf44f19f@linux.ibm.com> (raw)
In-Reply-To: <aae40a5a-63a6-e802-53bb-9683d03ad57d@linux.ibm.com>
On 2020-04-22 09:35, Janosch Frank wrote:
> On 2/20/20 1:00 PM, Pierre Morel wrote:
>> This patch defines the PSW bits EA/BA used to initialize the PSW masks
>> for exceptions.
>>
>> Since some PSW mask definitions exist already in arch_def.h we add these
>> definitions there.
>> We move all PSW definitions together and protect assembler code against
>> C syntax.
>
> Please fix the issue mentioned below and run *all* tests against your
> new code to verify you didn't introduce regressions.
>
> The rest looks good to me.
Thanks,
>
>>
>> Signed-off-by: Pierre Morel <pmorel@linux.ibm.com>
>> ---
>> lib/s390x/asm/arch_def.h | 15 +++++++++++----
>> s390x/cstart64.S | 15 ++++++++-------
>> 2 files changed, 19 insertions(+), 11 deletions(-)
>>
>> diff --git a/lib/s390x/asm/arch_def.h b/lib/s390x/asm/arch_def.h
>> index 15a4d49..69a8256 100644
>> --- a/lib/s390x/asm/arch_def.h
>> +++ b/lib/s390x/asm/arch_def.h
>> @@ -10,15 +10,21 @@
>> #ifndef _ASM_S390X_ARCH_DEF_H_
>> #define _ASM_S390X_ARCH_DEF_H_
>>
>> +#define PSW_MASK_EXT 0x0100000000000000UL
>> +#define PSW_MASK_DAT 0x0400000000000000UL
>> +#define PSW_MASK_PSTATE 0x0001000000000000UL
>> +#define PSW_MASK_BA 0x0000000080000000UL
>> +#define PSW_MASK_EA 0x0000000100000000UL
>> +
>> +#define PSW_EXCEPTION_MASK (PSW_MASK_EA|PSW_MASK_BA)
>
> Could you add a space before and after the | ?
>
>> +
>> +#ifndef __ASSEMBLER__
>> +
>> struct psw {
>> uint64_t mask;
>> uint64_t addr;
>> };
>>
>> -#define PSW_MASK_EXT 0x0100000000000000UL
>> -#define PSW_MASK_DAT 0x0400000000000000UL
>> -#define PSW_MASK_PSTATE 0x0001000000000000UL
>> -
>> #define CR0_EXTM_SCLP 0X0000000000000200UL
>> #define CR0_EXTM_EXTC 0X0000000000002000UL
>> #define CR0_EXTM_EMGC 0X0000000000004000UL
>> @@ -297,4 +303,5 @@ static inline uint32_t get_prefix(void)
>> return current_prefix;
>> }
>>
>> +#endif /* not __ASSEMBLER__ */
>> #endif
>> diff --git a/s390x/cstart64.S b/s390x/cstart64.S
>> index 45da523..2885a36 100644
>> --- a/s390x/cstart64.S
>> +++ b/s390x/cstart64.S
>> @@ -12,6 +12,7 @@
>> */
>> #include <asm/asm-offsets.h>
>> #include <asm/sigp.h>
>> +#include <asm/arch_def.h>
>>
>> .section .init
>>
>> @@ -214,19 +215,19 @@ svc_int:
>>
>> .align 8
>> reset_psw:
>> - .quad 0x0008000180000000
>> + .quad PSW_EXCEPTION_MASK
>
> That won't work, this is a short PSW and you're removing the short
> indication here. Notice the 0008 at the front.
>
Will change and define PSW_MASK_SHORT_PSW and PSW_RESET_MASK like:
#define PSW_MASK_SHORT_PSW 0x0008000000000000UL
...
#define PSW_EXCEPTION_MASK (PSW_MASK_EA | PSW_MASK_BA)
#define PSW_RESET_MASK (PSW_EXCEPTION_MASK | PSW_MASK_SHORT_PSW)
--
Pierre Morel
IBM Lab Boeblingen
next prev parent reply other threads:[~2020-04-22 9:06 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-20 12:00 [kvm-unit-tests PATCH v5 00/10] s390x: Testing the Channel Subsystem I/O Pierre Morel
2020-02-20 12:00 ` [kvm-unit-tests PATCH v5 01/10] s390x: saving regs for interrupts Pierre Morel
2020-04-22 7:47 ` Janosch Frank
2020-04-22 9:09 ` Pierre Morel
2020-02-20 12:00 ` [kvm-unit-tests PATCH v5 02/10] s390x: Use PSW bits definitions in cstart Pierre Morel
2020-04-21 16:16 ` David Hildenbrand
2020-04-22 5:53 ` Pierre Morel
2020-04-22 7:35 ` Janosch Frank
2020-04-22 7:44 ` David Hildenbrand
2020-04-22 8:59 ` Pierre Morel
2020-04-22 9:07 ` David Hildenbrand
2020-04-22 9:09 ` Pierre Morel
2020-04-22 9:06 ` Pierre Morel [this message]
2020-04-22 9:13 ` Janosch Frank
2020-02-20 12:00 ` [kvm-unit-tests PATCH v5 03/10] s390x: cr0: adding AFP-register control bit Pierre Morel
2020-04-21 16:15 ` David Hildenbrand
2020-04-22 5:54 ` Pierre Morel
2020-04-22 7:39 ` Janosch Frank
2020-04-22 9:11 ` Pierre Morel
2020-04-22 7:59 ` Cornelia Huck
2020-04-22 9:12 ` Pierre Morel
2020-02-20 12:00 ` [kvm-unit-tests PATCH v5 04/10] s390x: interrupt registration Pierre Morel
2020-04-24 8:27 ` Janosch Frank
2020-04-24 10:44 ` Pierre Morel
2020-04-24 10:49 ` Cornelia Huck
2020-02-20 12:00 ` [kvm-unit-tests PATCH v5 05/10] s390x: export the clock get_clock_ms() utility Pierre Morel
2020-04-22 8:05 ` Cornelia Huck
2020-04-22 9:12 ` Pierre Morel
2020-02-20 12:00 ` [kvm-unit-tests PATCH v5 06/10] s390x: Library resources for CSS tests Pierre Morel
2020-02-20 12:00 ` [kvm-unit-tests PATCH v5 07/10] s390x: css: stsch, enumeration test Pierre Morel
2020-02-20 12:00 ` [kvm-unit-tests PATCH v5 08/10] s390x: css: msch, enable test Pierre Morel
2020-02-20 12:00 ` [kvm-unit-tests PATCH v5 09/10] s390x: css: ssch/tsch with sense and interrupt Pierre Morel
2020-02-20 12:00 ` [kvm-unit-tests PATCH v5 10/10] s390x: css: ping pong Pierre Morel
2020-04-21 16:13 ` [kvm-unit-tests PATCH v5 00/10] s390x: Testing the Channel Subsystem I/O Pierre Morel
2020-04-21 16:18 ` David Hildenbrand
2020-04-22 7:43 ` Janosch Frank
2020-04-22 9:17 ` Pierre Morel
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=1b38a0e5-76cf-c3da-fe8d-7a75bf44f19f@linux.ibm.com \
--to=pmorel@linux.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox