From: Janis Schoetterl-Glausch <scgl@linux.ibm.com>
To: Janosch Frank <frankja@linux.ibm.com>,
Thomas Huth <thuth@redhat.com>,
Claudio Imbrenda <imbrenda@linux.ibm.com>
Cc: David Hildenbrand <david@redhat.com>,
kvm@vger.kernel.org, linux-s390@vger.kernel.org
Subject: Re: [kvm-unit-tests PATCH v2 3/3] s390x: Rework TEID decoding and usage
Date: Mon, 13 Jun 2022 14:40:37 +0200 [thread overview]
Message-ID: <edada13d972cff5626283fb3c45277d2ddc8ec24.camel@linux.ibm.com> (raw)
In-Reply-To: <1c233f7b-2a21-bbf2-92ef-fb1091423cbd@linux.ibm.com>
On Fri, 2022-06-10 at 14:10 +0200, Janosch Frank wrote:
> On 6/10/22 12:37, Janis Schoetterl-Glausch wrote:
> > On 6/10/22 11:31, Janosch Frank wrote:
> > > On 6/8/22 15:33, Janis Schoetterl-Glausch wrote:
> > > > The translation-exception identification (TEID) contains information to
> > > > identify the cause of certain program exceptions, including translation
> > > > exceptions occurring during dynamic address translation, as well as
> > > > protection exceptions.
> > > > The meaning of fields in the TEID is complex, depending on the exception
> > > > occurring and various potentially installed facilities.
> > > >
> > > > Rework the type describing the TEID, in order to ease decoding.
> > > > Change the existing code interpreting the TEID and extend it to take the
> > > > installed suppression-on-protection facility into account.
> > > >
> > > > Signed-off-by: Janis Schoetterl-Glausch <scgl@linux.ibm.com>
> > > > ---
> > > > lib/s390x/asm/interrupt.h | 61 +++++++++++++++++++++++++++---------
> > > > lib/s390x/fault.h | 30 +++++-------------
> > > > lib/s390x/fault.c | 65 ++++++++++++++++++++++++++-------------
> > > > lib/s390x/interrupt.c | 2 +-
> > > > s390x/edat.c | 26 ++++++++++------
> > > > 5 files changed, 115 insertions(+), 69 deletions(-)
> > >
[...]
> > > > +static void print_decode_pgm_prot(union teid teid, bool dat)
> > > > +{
> > > > + switch (get_supp_on_prot_facility()) {
> > > > + case SOP_NONE:
> > > > + printf("Type: ?\n");
> > > > + break;
> > > > + case SOP_BASIC:
> > > > + if (teid.sop_teid_predictable && dat && teid.sop_acc_list)
> > > > + printf("Type: ACC\n");
> > > > + else
> > > > + printf("Type: ?\n");
> > > > + break;
> > >
> > > I'm wondering if we should cut off the two possibilities above to make it a bit more sane. The SOP facility is about my age now and ESOP1 has been introduced with z10 if I'm not mistaken so it's not young either.
> >
> > So
> >
> > case SOP_NONE:
> > case SOP_BASIC:
> > assert(false);
> >
> > ?
>
> I'd check (e)sop on initialization and abort early so we never need to
> worry about it in other files.
We could just ignore those cases since we don't depend on them for the
tests to function. Breaking all tests seems disproportional to me.
>
> >
> > >
> > > Do we have tests that require SOP/no-SOP?
> >
> > No, just going for correctness.
> >
>
prev parent reply other threads:[~2022-06-13 17:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-08 13:33 [kvm-unit-tests PATCH v2 0/3] s390x: Rework TEID decoding and usage Janis Schoetterl-Glausch
2022-06-08 13:33 ` [kvm-unit-tests PATCH v2 1/3] s390x: Fix sclp facility bit numbers Janis Schoetterl-Glausch
2022-06-08 13:33 ` [kvm-unit-tests PATCH v2 2/3] s390x: lib: SOP facility query function Janis Schoetterl-Glausch
2022-06-08 13:33 ` [kvm-unit-tests PATCH v2 3/3] s390x: Rework TEID decoding and usage Janis Schoetterl-Glausch
2022-06-08 14:03 ` Claudio Imbrenda
2022-06-08 15:55 ` Janis Schoetterl-Glausch
2022-06-08 16:40 ` Claudio Imbrenda
2022-06-10 9:31 ` Janosch Frank
2022-06-10 10:37 ` Janis Schoetterl-Glausch
2022-06-10 12:10 ` Janosch Frank
2022-06-13 12:40 ` Janis Schoetterl-Glausch [this message]
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=edada13d972cff5626283fb3c45277d2ddc8ec24.camel@linux.ibm.com \
--to=scgl@linux.ibm.com \
--cc=david@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=imbrenda@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