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 v5 02/10] s390x: Use PSW bits definitions in cstart
Date: Wed, 22 Apr 2020 07:53:30 +0200 [thread overview]
Message-ID: <2ca34025-a366-2431-daba-8b08bff84aad@linux.ibm.com> (raw)
In-Reply-To: <f8cb512c-8146-3777-13a8-5c06017334cf@redhat.com>
On 2020-04-21 18:16, David Hildenbrand wrote:
> On 20.02.20 13:00, 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 | 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)
>> +
>> +#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
>> initial_psw:
>> - .quad 0x0000000180000000, clear_bss_start
>> + .quad PSW_EXCEPTION_MASK, clear_bss_start
>> pgm_int_psw:
>> - .quad 0x0000000180000000, pgm_int
>> + .quad PSW_EXCEPTION_MASK, pgm_int
>> ext_int_psw:
>> - .quad 0x0000000180000000, ext_int
>> + .quad PSW_EXCEPTION_MASK, ext_int
>> mcck_int_psw:
>> - .quad 0x0000000180000000, mcck_int
>> + .quad PSW_EXCEPTION_MASK, mcck_int
>> io_int_psw:
>> - .quad 0x0000000180000000, io_int
>> + .quad PSW_EXCEPTION_MASK, io_int
>> svc_int_psw:
>> - .quad 0x0000000180000000, svc_int
>> + .quad PSW_EXCEPTION_MASK, svc_int
>> initial_cr0:
>> /* enable AFP-register control, so FP regs (+BFP instr) can be used */
>> .quad 0x0000000000040000
>>
>
> Reviewed-by: David Hildenbrand <david@redhat.com>
>
Thanks,
Pierre
--
Pierre Morel
IBM Lab Boeblingen
next prev parent reply other threads:[~2020-04-22 5:53 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 [this message]
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
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=2ca34025-a366-2431-daba-8b08bff84aad@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