OSDN Git Service
(root)
/
qmiga
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fde8206
)
s390x/css: ccw-0 enforces count > 0
author
Cornelia Huck
<cornelia.huck@de.ibm.com>
Thu, 16 Jul 2015 08:42:18 +0000
(10:42 +0200)
committer
Cornelia Huck
<cornelia.huck@de.ibm.com>
Mon, 7 Sep 2015 14:10:42 +0000
(16:10 +0200)
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>
hw/s390x/css.c
patch
|
blob
|
history
diff --git
a/hw/s390x/css.c
b/hw/s390x/css.c
index
2c0782c
..
9596280
100644
(file)
--- 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;