@@ -103,9 +103,30 @@ static void ssch_orb_cpa_zero(void)
orb->cpa = cpa;
}
+static void ssch_orb_alignment(void)
+{
+ void *p;
+
+ /* Prepare a Valid orb on a misaligned address*/
+ p = alloc_pages_flags(0, AREA_DMA31);
+ assert(p);
+ p += 2;
+
+ ((struct orb *)p)->intparm = test_device_sid;
+ ((struct orb *)p)->ctrl = ORB_CTRL_ISIC | ORB_CTRL_FMT | ORB_LPM_DFLT;
+ ((struct orb *)p)->cpa = (long)ccw;
+
+ expect_pgm_int();
+ ssch(test_device_sid, p);
+ check_pgm_int_code(PGM_INT_CODE_SPECIFICATION);
+
+ free_pages(p - 2);
+}
+
static struct tests ssh_tests[] = {
{ "privilege", ssch_privilege },
{ "orb cpa zero", ssch_orb_cpa_zero },
+ { "orb alignment", ssch_orb_alignment },
{ NULL, NULL }
};
We expect a specification exception for a misaligned ORB. Signed-off-by: Pierre Morel <pmorel@linux.ibm.com> --- s390x/css.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)