Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: Janosch Frank <frankja@linux.ibm.com>
To: kvm@vger.kernel.org
Cc: linux-s390@vger.kernel.org, imbrenda@linux.ibm.com, nrb@linux.ibm.com
Subject: [kvm-unit-tests 2/2] s390x: skey: Fence TCG protection checks
Date: Tue,  4 Aug 2026 14:16:29 +0000	[thread overview]
Message-ID: <20260804142133.1745878-3-frankja@linux.ibm.com> (raw)
In-Reply-To: <20260804142133.1745878-1-frankja@linux.ibm.com>

TCG does not implement the skey memory protection, skip those tests
under TCG instead of filtering them in the CI logs.

This way the test will PASS when run by humans and there's no
confusion why it fails anymore.

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
---
 s390x/skey.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/s390x/skey.c b/s390x/skey.c
index bb769730..1fc95857 100644
--- a/s390x/skey.c
+++ b/s390x/skey.c
@@ -14,6 +14,7 @@
 #include <vmalloc.h>
 #include <css.h>
 #include <mmu.h>
+#include <hardware.h>
 #include <asm/page.h>
 #include <asm/facility.h>
 #include <asm/mem.h>
@@ -736,6 +737,13 @@ int main(void)
 	test_set();
 	test_set_mb();
 	test_chg();
+
+	if  (detect_host() == HOST_IS_TCG) {
+		report_skip("No actual access protection in TCG for skeys.");
+		report_prefix_pop();
+		return report_summary();
+	}
+
 	test_test_protection();
 	test_store_cpu_address();
 	test_diag_308();
-- 
2.53.0


  parent reply	other threads:[~2026-08-04 14:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-04 14:16 [kvm-unit-tests 0/2] s390x: Fixup test fencing Janosch Frank
2026-08-04 14:16 ` [kvm-unit-tests 1/2] s390x: unittests: Reenable tcg for migration tests Janosch Frank
2026-08-04 14:16 ` Janosch Frank [this message]
2026-08-06  8:38   ` [kvm-unit-tests 2/2] s390x: skey: Fence TCG protection checks 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=20260804142133.1745878-3-frankja@linux.ibm.com \
    --to=frankja@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=nrb@linux.ibm.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