public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
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 v5 0/3] More skey instr. emulation test
Date: Tue, 21 Jun 2022 17:40:24 +0200	[thread overview]
Message-ID: <20220621174024.0cfffed7@p-imbrenda> (raw)
In-Reply-To: <20220621143609.753452-1-scgl@linux.ibm.com>

On Tue, 21 Jun 2022 16:36:06 +0200
Janis Schoetterl-Glausch <scgl@linux.ibm.com> wrote:

> Add test cases similar to those testing the effect of storage keys on
> instructions emulated by KVM, but test instructions emulated by user
> space/qemu instead.
> Test that DIAG 308 is not subject to key protection.
> Additionally, check the transaction exception identification on
> protection exceptions.

thanks, queued

> 
> This series is based on v3 of s390x: Rework TEID decoding and usage .
> 
> v4 -> v5
>  * rebase onto v3 of TEID series
>  * ignore ancient machines without at least ESOP-1
> 
> v3 -> v4
>  * rebase on newest TEID decoding series
>  * pick up r-b's (Thanks Claudio)
>  * add check for protection code validity in case of basic SOP
> 
> v2 -> v3
>  * move sclp patch and part of TEID test to series
>        s390x: Rework TEID decoding and usage
>  * make use of reworked TEID union in skey TEID test
>  * get rid of pointer to array for diag 308 test
>  * use lowcore symbol and mem_all
>  * don't reset intparm when expecting exception in msch test
> 
> v1 -> v2
>  * don't mixup sclp fix with new bits for the TEID patch
>  * address feedback
>        * cosmetic changes, i.e. shortening identifiers
>        * remove unconditional report_info
>  * add DIAG 308 test
> 
> Janis Schoetterl-Glausch (3):
>   s390x: Test TEID values in storage key test
>   s390x: Test effect of storage keys on some more instructions
>   s390x: Test effect of storage keys on diag 308
> 
>  s390x/skey.c        | 379 +++++++++++++++++++++++++++++++++++++++++++-
>  s390x/unittests.cfg |   1 +
>  2 files changed, 374 insertions(+), 6 deletions(-)
> 
> Range-diff against v4:
> 1:  fbfd7e3b ! 1:  a30f2b45 s390x: Test TEID values in storage key test
>     @@ s390x/skey.c: static void test_test_protection(void)
>      +{
>      +	union teid teid;
>      +	int access_code;
>     -+	bool dat;
>      +
>      +	check_pgm_int_code(PGM_INT_CODE_PROTECTION);
>      +	report_prefix_push("TEID");
>      +	teid.val = lowcore.trans_exc_id;
>      +	switch (get_supp_on_prot_facility()) {
>      +	case SOP_NONE:
>     -+		break;
>      +	case SOP_BASIC:
>     -+		dat = extract_psw_mask() & PSW_MASK_DAT;
>     -+		report(!teid.sop_teid_predictable || !dat || !teid.sop_acc_list,
>     -+		       "valid protection code");
>     ++		/* let's ignore ancient/irrelevant machines */
>      +		break;
>      +	case SOP_ENHANCED_1:
>      +		report(!teid.sop_teid_predictable, "valid protection code");
>     ++		/* no access code in case of key protection */
>      +		break;
>      +	case SOP_ENHANCED_2:
>      +		switch (teid_esop2_prot_code(teid)) {
>      +		case PROT_KEY:
>     -+			access_code = teid.acc_exc_f_s;
>     ++			/* ESOP-2: no need to check facility */
>     ++			access_code = teid.acc_exc_fetch_store;
>      +
>      +			switch (access_code) {
>      +			case 0:
>     @@ s390x/skey.c: static void test_test_protection(void)
>      +				break;
>      +			}
>      +			/* fallthrough */
>     -+		case PROT_KEY_LAP:
>     ++		case PROT_KEY_OR_LAP:
>      +			report_pass("valid protection code");
>      +			break;
>      +		default:
> 2:  868bb863 = 2:  b194f716 s390x: Test effect of storage keys on some more instructions
> 3:  d49934c0 = 3:  460d77ec s390x: Test effect of storage keys on diag 308
> 
> base-commit: 610c15284a537484682adfb4b6d6313991ab954f
> prerequisite-patch-id: bebbc71ca3cc8d085e36a049466dba5a420c9c75
> prerequisite-patch-id: d38a4fc7bc1fa6e352502f294cb9413f0b738b99
> prerequisite-patch-id: 15d25aaab40e81ad60a13218eaba370585c4a87e


      parent reply	other threads:[~2022-06-21 15:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-21 14:36 [kvm-unit-tests PATCH v5 0/3] More skey instr. emulation test Janis Schoetterl-Glausch
2022-06-21 14:36 ` [kvm-unit-tests PATCH v5 1/3] s390x: Test TEID values in storage key test Janis Schoetterl-Glausch
2022-06-21 14:36 ` [kvm-unit-tests PATCH v5 2/3] s390x: Test effect of storage keys on some more instructions Janis Schoetterl-Glausch
2022-06-21 14:36 ` [kvm-unit-tests PATCH v5 3/3] s390x: Test effect of storage keys on diag 308 Janis Schoetterl-Glausch
2022-06-21 15:40 ` Claudio Imbrenda [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=20220621174024.0cfffed7@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