mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-09-02 15:02:02 -06:00
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>
This commit is contained in:
parent
fde8206b80
commit
fa4463e043
1 changed files with 4 additions and 0 deletions
|
@ -290,6 +290,10 @@ static int css_interpret_ccw(SubchDev *sch, hwaddr ccw_addr)
|
||||||
((ccw.cmd_code & 0xf0) != 0)) {
|
((ccw.cmd_code & 0xf0) != 0)) {
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
if (!sch->ccw_fmt_1 && (ccw.count == 0) &&
|
||||||
|
(ccw.cmd_code != CCW_CMD_TIC)) {
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
if (ccw.flags & CCW_FLAG_SUSPEND) {
|
if (ccw.flags & CCW_FLAG_SUSPEND) {
|
||||||
return -EINPROGRESS;
|
return -EINPROGRESS;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue