From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-1.mimecast.com ([205.139.110.61]:58229 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730122AbgFHOxJ (ORCPT ); Mon, 8 Jun 2020 10:53:09 -0400 Subject: Re: [kvm-unit-tests PATCH v8 01/12] s390x: Use PSW bits definitions in cstart References: <1591603981-16879-1-git-send-email-pmorel@linux.ibm.com> <1591603981-16879-2-git-send-email-pmorel@linux.ibm.com> <59f3dda9-6cd1-a3b4-5265-1a9fb2ff51ed@redhat.com> From: Thomas Huth Message-ID: <1e51b893-dc1e-1740-f286-ec00195d6a7f@redhat.com> Date: Mon, 8 Jun 2020 16:52:35 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-s390-owner@vger.kernel.org List-ID: To: Pierre Morel , kvm@vger.kernel.org Cc: linux-s390@vger.kernel.org, frankja@linux.ibm.com, david@redhat.com, cohuck@redhat.com On 08/06/2020 16.33, Pierre Morel wrote: > > > On 2020-06-08 10:43, Thomas Huth wrote: >> On 08/06/2020 10.12, 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 >>> Reviewed-by: Janosch Frank >>> --- >>>   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 1b3bb0c..5388114 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_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) >> >> PSW_EXCEPTION_MASK sounds a little bit unfortunate - that term rather >> reminds me of something that disables some interrupts >> ... in case you >> respin, maybe rather use something like "PSW_EXC_ADDR_MODE" ? > > EXCEPTIONS_PSW_MASK ? I think it is the _MASK suffix that mainly bugs me here, since this is not a define that you normally use for extracting the bits from a PSW... so EXCEPTIONS_PSW without _MASK would be fine for me... but as long as I'm the only one who has a strange feeling about this, it's also ok if you keep the current name. Thomas