[kvm-unit-tests 2/2] s390x: skey: Fence TCG protection checks

Janosch Frank <[email protected]>
Newsgroups org.kernel.vger.linux-s390,org.kernel.vger.kvm
Message-ID <[email protected]>
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 <[email protected]>
---
 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.