diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2015-07-16 10:42:18 +0200 |
---|---|---|
committer | Cornelia Huck <cornelia.huck@de.ibm.com> | 2015-09-07 16:10:42 +0200 |
commit | fa4463e0432ab66432a28d6b975f8eed99b3f4fa (patch) | |
tree | cac0f7e174049dda0d49b47136b0722f6da14f78 /hw | |
parent | fde8206b8061f808c880709c2ac26a645b11c211 (diff) | |
download | qemu-fa4463e0432ab66432a28d6b975f8eed99b3f4fa.zip qemu-fa4463e0432ab66432a28d6b975f8eed99b3f4fa.tar.gz qemu-fa4463e0432ab66432a28d6b975f8eed99b3f4fa.tar.bz2 |
s390x/css: ccw-0 enforces count > 0
Type-0 ccws need to have a count > 0 for any command other than TIC.
Generate a channel-program check if this is not the case.
Reviewed-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/s390x/css.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/s390x/css.c b/hw/s390x/css.c index 2c0782c..9596280 100644 --- a/hw/s390x/css.c +++ b/hw/s390x/css.c @@ -290,6 +290,10 @@ static int css_interpret_ccw(SubchDev *sch, hwaddr ccw_addr) ((ccw.cmd_code & 0xf0) != 0)) { return -EINVAL; } + if (!sch->ccw_fmt_1 && (ccw.count == 0) && + (ccw.cmd_code != CCW_CMD_TIC)) { + return -EINVAL; + } if (ccw.flags & CCW_FLAG_SUSPEND) { return -EINPROGRESS; |