Skip to contentSkip to conversation

s390x: Add a test for the diagnose 0x308 hypercall

PATCH New Thomas Huth 1 participant 1 message Apr 16, 2019 KVM

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 s390x: Add a test for the diagnose 0x308 hypercall

The original idea for this test is to have an easy way to check for a problem that has been fixed in QEMU recently: QEMU simply aborted if this diagnose call was called with an unsupported subcode (e.g. 2). The problem has been fixed in QEMU commit 37dbd1f4d4805edcd18d94eb202bb3461b3cd52d ("Return specification exception for unimplemented diag 308 subcodes"), and this test now should make sure that we do not regress here again. While we're at it, also check whether LOAD NORMAL via subcode 1 works correctly, whether the diagnose call is blocked correctly in problem state and whether subcodes 5 and 6 are generating specification exceptions for illegal parameters as expected.

---
v3: Use "d" in assembler constraints instead of "a"

 s390x/Makefile      |   1 +
 s390x/diag308.c     | 130 ++++++++++++++++++++++++++++++++++++++++++++
 s390x/unittests.cfg |   3 +
 3 files changed, 134 insertions(+)
 create mode 100644 s390x/diag308.c
s390x/Makefile +1 -0
index af40fd4..1f21ddb 100644
@@ -5,6 +5,7 @@ tests += $(TEST_DIR)/sieve.elf
 tests += $(TEST_DIR)/sthyi.elf
 tests += $(TEST_DIR)/skey.elf
 tests += $(TEST_DIR)/diag10.elf
+tests += $(TEST_DIR)/diag308.elf
 tests += $(TEST_DIR)/pfmf.elf
 tests += $(TEST_DIR)/cmm.elf
 tests += $(TEST_DIR)/vector.elf
s390x/diag308.c new file +130 -0

130 lines not on this page · raw message

s390x/unittests.cfg +3 -0
index e53c365..546b1f2 100644
@@ -44,6 +44,9 @@ file = skey.elf
 [diag10]
 file = diag10.elf
 
+[diag308]
+file = diag308.elf
+
 [pfmf]
 file = pfmf.elf
 
Signature · 1 line
2.21.0