public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Claudio Imbrenda <imbrenda@linux.ibm.com>
To: kvm@vger.kernel.org
Cc: linux-s390@vger.kernel.org, frankja@linux.ibm.com,
	scgl@linux.ibm.com, borntraeger@de.ibm.com, pmorel@linux.ibm.com,
	pasic@linux.ibm.com, nrb@linux.ibm.com, thuth@redhat.com,
	david@redhat.com
Subject: [kvm-unit-tests PATCH v2 2/5] s390x: skey: remove check for old z/VM version
Date: Thu, 31 Mar 2022 18:04:16 +0200	[thread overview]
Message-ID: <20220331160419.333157-3-imbrenda@linux.ibm.com> (raw)
In-Reply-To: <20220331160419.333157-1-imbrenda@linux.ibm.com>

Remove the check for z/VM 6.x, since it is not needed anymore.

Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
---
 s390x/skey.c | 37 ++++---------------------------------
 1 file changed, 4 insertions(+), 33 deletions(-)

diff --git a/s390x/skey.c b/s390x/skey.c
index 58a55436..edad53e9 100644
--- a/s390x/skey.c
+++ b/s390x/skey.c
@@ -65,33 +65,9 @@ static void test_set(void)
 	       "set key test");
 }
 
-/* Returns true if we are running under z/VM 6.x */
-static bool check_for_zvm6(void)
-{
-	int dcbt;	/* Descriptor block count */
-	int nr;
-	static const unsigned char zvm6[] = {
-		/* This is "z/VM    6" in EBCDIC */
-		0xa9, 0x61, 0xe5, 0xd4, 0x40, 0x40, 0x40, 0x40, 0xf6
-	};
-
-	if (stsi(pagebuf, 3, 2, 2))
-		return false;
-
-	dcbt = pagebuf[31] & 0xf;
-
-	for (nr = 0; nr < dcbt; nr++) {
-		if (!memcmp(&pagebuf[32 + nr * 64 + 24], zvm6, sizeof(zvm6)))
-			return true;
-	}
-
-	return false;
-}
-
 static void test_priv(void)
 {
 	union skey skey;
-	bool is_zvm6 = check_for_zvm6();
 
 	memset(pagebuf, 0, PAGE_SIZE * 2);
 	report_prefix_push("privileged");
@@ -106,15 +82,10 @@ static void test_priv(void)
 	report(skey.str.acc != 3, "skey did not change on exception");
 
 	report_prefix_push("iske");
-	if (is_zvm6) {
-		/* There is a known bug with z/VM 6, so skip the test there */
-		report_skip("not working on z/VM 6");
-	} else {
-		expect_pgm_int();
-		enter_pstate();
-		get_storage_key(pagebuf);
-		check_pgm_int_code(PGM_INT_CODE_PRIVILEGED_OPERATION);
-	}
+	expect_pgm_int();
+	enter_pstate();
+	get_storage_key(pagebuf);
+	check_pgm_int_code(PGM_INT_CODE_PRIVILEGED_OPERATION);
 	report_prefix_pop();
 
 	report_prefix_pop();
-- 
2.34.1


  parent reply	other threads:[~2022-03-31 16:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-31 16:04 [kvm-unit-tests PATCH v2 0/5] lib: s390x: Refactor and rename vm.[ch] Claudio Imbrenda
2022-03-31 16:04 ` [kvm-unit-tests PATCH v2 1/5] s390x: remove spurious includes Claudio Imbrenda
2022-03-31 16:04 ` Claudio Imbrenda [this message]
2022-04-01  8:09   ` [kvm-unit-tests PATCH v2 2/5] s390x: skey: remove check for old z/VM version Janosch Frank
2022-03-31 16:04 ` [kvm-unit-tests PATCH v2 3/5] lib: s390: rename and refactor vm.[ch] Claudio Imbrenda
2022-04-01  8:14   ` Janosch Frank
2022-03-31 16:04 ` [kvm-unit-tests PATCH v2 4/5] lib: s390x: functions for machine models Claudio Imbrenda
2022-04-01  8:10   ` Janosch Frank
2022-03-31 16:04 ` [kvm-unit-tests PATCH v2 5/5] lib: s390x: stidp wrapper and move get_machine_id 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=20220331160419.333157-3-imbrenda@linux.ibm.com \
    --to=imbrenda@linux.ibm.com \
    --cc=borntraeger@de.ibm.com \
    --cc=david@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=nrb@linux.ibm.com \
    --cc=pasic@linux.ibm.com \
    --cc=pmorel@linux.ibm.com \
    --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