From: Pierre Morel <pmorel@linux.ibm.com>
To: David Hildenbrand <david@redhat.com>, kvm@vger.kernel.org
Cc: linux-s390@vger.kernel.org, frankja@linux.ibm.com,
thuth@redhat.com, cohuck@redhat.com
Subject: Re: [kvm-unit-tests PATCH v6 02/10] s390x: Use PSW bits definitions in cstart
Date: Tue, 28 Apr 2020 10:10:23 +0200 [thread overview]
Message-ID: <6bc4a268-e4c4-d9f0-1e4a-94c48a081c10@linux.ibm.com> (raw)
In-Reply-To: <231839f0-41f9-844c-efc4-34893e7b720f@redhat.com>
On 2020-04-27 11:01, David Hildenbrand wrote:
> On 24.04.20 12:45, 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.
>>
>> Signed-off-by: Pierre Morel <pmorel@linux.ibm.com>
>> ---
>> lib/s390x/asm/arch_def.h | 16 ++++++++++++----
>> s390x/cstart64.S | 15 ++++++++-------
>> 2 files changed, 20 insertions(+), 11 deletions(-)
>>
>> diff --git a/lib/s390x/asm/arch_def.h b/lib/s390x/asm/arch_def.h
>> index 15a4d49..c54409a 100644
>> --- a/lib/s390x/asm/arch_def.h
>> +++ b/lib/s390x/asm/arch_def.h
>> @@ -10,15 +10,22 @@
>> #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_SHORT_PSW 0x0008000000000000UL
>> +#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)
>> +#define PSW_RESET_MASK (PSW_EXCEPTION_MASK | PSW_MASK_SHORT_PSW)
>> +
>> +#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 +304,5 @@ static inline uint32_t get_prefix(void)
>> return current_prefix;
>> }
>>
>> +#endif /* __ASSEMBLER */
>> #endif
>> diff --git a/s390x/cstart64.S b/s390x/cstart64.S
>> index ba2e67c..e394b3a 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
>>
>> @@ -225,19 +226,19 @@ svc_int:
>>
>> .align 8
>> reset_psw:
>> - .quad 0x0008000180000000
>> + .quad PSW_RESET_MASK
>
> I'd really prefer
>
> .quad PSW_EXCEPTION_MASK | PSW_MASK_SHORT_PSW
>
> here instead and drop PSW_RESET_MASK. Makes it clearer that we are
> talking about a special short psw here.
>
> Apart from that, looks good to me.
>
>
Thanks, I will do as you propose,
Regards,
Pierre
--
Pierre Morel
IBM Lab Boeblingen
next prev parent reply other threads:[~2020-04-28 8:10 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-24 10:45 [kvm-unit-tests PATCH v6 00/10] s390x: Testing the Channel Subsystem I/O Pierre Morel
2020-04-24 10:45 ` [kvm-unit-tests PATCH v6 01/10] s390x: saving regs for interrupts Pierre Morel
2020-04-27 8:59 ` David Hildenbrand
2020-04-27 10:50 ` Pierre Morel
2020-04-24 10:45 ` [kvm-unit-tests PATCH v6 02/10] s390x: Use PSW bits definitions in cstart Pierre Morel
2020-04-27 9:01 ` David Hildenbrand
2020-04-28 8:10 ` Pierre Morel [this message]
2020-04-24 10:45 ` [kvm-unit-tests PATCH v6 03/10] s390x: Move control register bit definitions and add AFP to them Pierre Morel
2020-04-24 10:45 ` [kvm-unit-tests PATCH v6 04/10] s390x: interrupt registration Pierre Morel
2020-05-14 11:58 ` Cornelia Huck
2020-05-15 6:57 ` Pierre Morel
2020-05-15 7:57 ` David Hildenbrand
2020-04-24 10:45 ` [kvm-unit-tests PATCH v6 05/10] s390x: Library resources for CSS tests Pierre Morel
2020-05-14 12:03 ` Cornelia Huck
2020-05-15 7:02 ` Pierre Morel
2020-05-15 7:11 ` Cornelia Huck
2020-05-15 7:14 ` Pierre Morel
2020-04-24 10:45 ` [kvm-unit-tests PATCH v6 06/10] s390x: css: stsch, enumeration test Pierre Morel
2020-04-27 13:06 ` Janosch Frank
2020-04-28 8:17 ` Pierre Morel
2020-05-14 12:05 ` Cornelia Huck
2020-05-15 7:05 ` Pierre Morel
2020-04-24 10:45 ` [kvm-unit-tests PATCH v6 07/10] s390x: css: msch, enable test Pierre Morel
2020-04-27 13:11 ` Janosch Frank
2020-04-28 8:27 ` Pierre Morel
2020-05-14 12:08 ` Cornelia Huck
2020-05-15 7:11 ` Pierre Morel
2020-05-15 8:25 ` Cornelia Huck
2020-05-15 8:53 ` Janosch Frank
2020-05-15 11:34 ` Pierre Morel
2020-04-24 10:45 ` [kvm-unit-tests PATCH v6 08/10] s390x: define wfi: wait for interrupt Pierre Morel
2020-04-27 12:59 ` Janosch Frank
2020-04-28 8:44 ` Pierre Morel
2020-04-28 9:20 ` Janosch Frank
2020-04-28 9:27 ` Pierre Morel
2020-04-24 10:45 ` [kvm-unit-tests PATCH v6 09/10] s390x: css: ssch/tsch with sense and interrupt Pierre Morel
2020-05-14 12:24 ` Cornelia Huck
2020-05-15 7:37 ` Pierre Morel
2020-04-24 10:45 ` [kvm-unit-tests PATCH v6 10/10] s390x: css: ping pong Pierre Morel
2020-04-27 13:14 ` Janosch Frank
2020-04-28 8:50 ` 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=6bc4a268-e4c4-d9f0-1e4a-94c48a081c10@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;
as well as URLs for NNTP newsgroup(s).