On Fri, 8 Sep 2017 17:24:46 +0200 Halil Pasic <pa...@linux.vnet.ibm.com> wrote:
> We report incorrect length via SCSW program check instead of incorrect > length check (SCWS word 2 bit 10 instead of bit 9). Since we have there > is no fitting errno for incorrect length, and since I don't like what we > do with the errno's, as part of the fix, errnos used for control flow in > ccw interpretation are replaced with an enum using more speaking names. I'm not sure whether this is the way to go. I mainly dislike the size of the patch (and the fact that it mixes a fix and a change of function signature). Can we instead choose a mapping for incorrect length, and defer a possible rework? (Another idea would be to have the callback prepare the scsw via helper functions. We'd just keep -EAGAIN to keep processing a chain and 0 to stop.) > > For virtio, if incorrect length checking is suppressed we keep the > current behavior (channel-program check). Confused. If it is suppressed, there should not be an error, no? > > Signed-off-by: Halil Pasic <pa...@linux.vnet.ibm.com> > --- > hw/s390x/3270-ccw.c | 24 +++++----- > hw/s390x/css.c | 67 +++++++++++++++----------- > hw/s390x/virtio-ccw.c | 128 > ++++++++++++++++++++++++------------------------- > include/hw/s390x/css.h | 13 ++++- > 4 files changed, 127 insertions(+), 105 deletions(-)