On Tue, 6 Apr 2021 09:40:49 +0200 Pierre Morel <pmorel@xxxxxxxxxxxxx> wrote: > Several bits of the ORB are reserved and must be zero. > Their use will trigger a operand exception. > > Signed-off-by: Pierre Morel <pmorel@xxxxxxxxxxxxx> > --- > s390x/css.c | 21 +++++++++++++++++++++ > 1 file changed, 21 insertions(+) > > diff --git a/s390x/css.c b/s390x/css.c > index 56adc16..26f5da6 100644 > --- a/s390x/css.c > +++ b/s390x/css.c > @@ -209,6 +209,26 @@ static void ssch_orb_midaw(void) > orb->ctrl = tmp; > } > > +static void ssch_orb_ctrl(void) > +{ > + uint32_t tmp = orb->ctrl; > + char buffer[80]; > + int i; > + > + /* Check the reserved bits of the ORB CTRL field */ > + for (i = 26; i <= 30; i++) { This looks very magic; can we get some defines? > + orb->ctrl |= (0x01 << (31 - i)); > + snprintf(buffer, 80, " %d", i); > + report_prefix_push(buffer); > + expect_pgm_int(); > + ssch(test_device_sid, orb); > + check_pgm_int_code(PGM_INT_CODE_OPERAND); > + report_prefix_pop(); > + > + orb->ctrl = tmp; > + } > +} > + > static struct tests ssh_tests[] = { > { "privilege", ssch_privilege }, > { "orb cpa zero", ssch_orb_cpa_zero }, > @@ -217,6 +237,7 @@ static struct tests ssh_tests[] = { > { "CCW access", ssch_ccw_access }, > { "CCW in DMA31", ssch_ccw_dma31 }, > { "ORB MIDAW unsupported", ssch_orb_midaw }, > + { "ORB reserved CTRL bits", ssch_orb_ctrl }, > { NULL, NULL } > }; >