s390x: add tests for diag258
cover s390x: add tests for diag258
Add tests for diag258 handling on s390x.
There recently was a bugfix in the kernel:
https://lore.kernel.org/r/[email protected]
This adds tests for it.
Nico Boehr (2):
s390x: add test for diag258
s390x: edat: move LC_SIZE to arch_def.h
lib/s390x/asm/arch_def.h | 1 + s390x/Makefile | 1 + s390x/diag258.c | 250 +++++++++++++++++++++++++++++++++++++++ s390x/edat.c | 1 - s390x/unittests.cfg | 3 + 5 files changed, 255 insertions(+), 1 deletion(-) create mode 100644 s390x/diag258.c
Signature · 1 line
2.46.0
PATCH 1/2 s390x: add test for diag258
This adds a test for diag258 (page ref service/async page fault).
There recently was a virtual-real address confusion bug, so we should test:
- diag258 parameter Rx is a real adress
- crossing the end of RAM with the parameter list yields an addressing exception
- invalid diagcode in the parameter block yields an specification exception
- diag258 correctly applies prefixing.
Note that we're just testing error cases as of now.
--- s390x/Makefile | 1 + s390x/diag258.c | 250 ++++++++++++++++++++++++++++++++++++++++++++ s390x/unittests.cfg | 3 + 3 files changed, 254 insertions(+) create mode 100644 s390x/diag258.c
s390x/Makefile +1 -0
@@ -44,6 +44,7 @@ tests += $(TEST_DIR)/exittime.elf tests += $(TEST_DIR)/ex.elf tests += $(TEST_DIR)/topology.elf tests += $(TEST_DIR)/sie-dat.elf +tests += $(TEST_DIR)/diag258.elf pv-tests += $(TEST_DIR)/pv-diags.elf pv-tests += $(TEST_DIR)/pv-icptcode.elf
s390x/diag258.c new file +250 -0
250 lines not on this page · raw message
s390x/unittests.cfg +3 -0
@@ -392,3 +392,6 @@ file = sie-dat.elf [pv-attest] file = pv-attest.elf + +[diag258] +file = diag258.elf
Signature · 1 line
2.46.0
PATCH 2/2 s390x: edat: move LC_SIZE to arch_def.h
In reply to Nico Boehrstruct lowcore is defined in arch_def.h and LC_SIZE is useful to other tests as well, therefore move it to arch_def.h.
--- lib/s390x/asm/arch_def.h | 1 + s390x/edat.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-)
lib/s390x/asm/arch_def.h +1 -0
@@ -119,6 +119,7 @@ enum address_space {#define CTL2_GUARDED_STORAGE (63 - 59) +#define LC_SIZE (2 * PAGE_SIZE)struct lowcore {uint8_t pad_0x0000[0x0080 -0x0000 ];/* 0x0000 */ uint32_t ext_int_param;/* 0x0080 */
s390x/edat.c +0 -1
@@ -17,7 +17,6 @@#define PGD_PAGE_SHIFT (REGION1_SHIFT - PAGE_SHIFT) -#define LC_SIZE (2 * PAGE_SIZE)#define VIRT (x) ((void *)((unsigned long)(x) + (unsigned long)mem)) static uint8_t prefix_buf[LC_SIZE] __attribute__((aligned(LC_SIZE)));
Signature · 1 line
2.46.0