From: Claudio Imbrenda <imbrenda@linux.ibm.com>
To: Janis Schoetterl-Glausch <scgl@linux.ibm.com>
Cc: Thomas Huth <thuth@redhat.com>,
Janosch Frank <frankja@linux.ibm.com>,
David Hildenbrand <david@redhat.com>,
kvm@vger.kernel.org, linux-s390@vger.kernel.org
Subject: Re: [kvm-unit-tests PATCH v3 1/3] s390x: Test TEID values in storage key test
Date: Thu, 9 Jun 2022 09:44:41 +0200 [thread overview]
Message-ID: <20220609094441.282f0cb9@p-imbrenda> (raw)
In-Reply-To: <a6d1dfe0f9163650c8b3bb80065e12a1b190f97b.camel@linux.ibm.com>
On Wed, 08 Jun 2022 19:03:23 +0200
Janis Schoetterl-Glausch <scgl@linux.ibm.com> wrote:
[...]
> > > + break;
> > > + case SOP_ENHANCED_2:
> > > + switch (teid_esop2_prot_code(teid)) {
> > > + case PROT_KEY:
> > > + access_code = teid.acc_exc_f_s;
> >
> > is the f/s feature guaranteed to be present when we have esop2?
>
> That's how I understand it. For esop1 the PoP explicitly states that
> the facility is a prerequisite, for esop2 it doesn't.
> >
> > can the f/s feature be present with esop1 or basic sop?
>
> esop1: yes, basic: no.
> The way I read it, in the case of esop1 the bits are only meaningful
> for DAT and access list exceptions, i.e. when the TEID is not
> unpredictable.
I see, makes sense
maybe add a comment :)
> >
> > > +
> > > + switch (access_code) {
> > > + case 0:
> > > + report_pass("valid access code");
> > > + break;
> > > + case 1:
> > > + case 2:
> > > + report((access & access_code) && (prot & access_code),
> > > + "valid access code");
> > > + break;
> > > + case 3:
> > > + /*
> > > + * This is incorrect in that reserved values
> > > + * should be ignored, but kvm should not return
> > > + * a reserved value and having a test for that
> > > + * is more valuable.
> > > + */
> > > + report_fail("valid access code");
> > > + break;
> > > + }
> > > + /* fallthrough */
> > > + case PROT_KEY_LAP:
> > > + report_pass("valid protection code");
> > > + break;
> > > + default:
> > > + report_fail("valid protection code");
> > > + }
> > > + break;
> > > + }
> > > + report_prefix_pop();
> > > +}
> > > +
>
> [...]
next prev parent reply other threads:[~2022-06-09 7:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-23 13:24 [kvm-unit-tests PATCH v3 0/4] More skey instr. emulation test Janis Schoetterl-Glausch
2022-05-23 13:24 ` [kvm-unit-tests PATCH v3 1/3] s390x: Test TEID values in storage key test Janis Schoetterl-Glausch
2022-05-24 15:09 ` Claudio Imbrenda
2022-06-08 17:03 ` Janis Schoetterl-Glausch
2022-06-09 7:44 ` Claudio Imbrenda [this message]
2022-05-23 13:24 ` [kvm-unit-tests PATCH v3 2/3] s390x: Test effect of storage keys on some more instructions Janis Schoetterl-Glausch
2022-05-25 6:05 ` Claudio Imbrenda
2022-05-23 13:24 ` [kvm-unit-tests PATCH v3 3/3] s390x: Test effect of storage keys on diag 308 Janis Schoetterl-Glausch
2022-05-24 15:01 ` Claudio Imbrenda
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=20220609094441.282f0cb9@p-imbrenda \
--to=imbrenda@linux.ibm.com \
--cc=david@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=scgl@linux.ibm.com \
--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